I’m trying to run a program that imports simplejson. When I run it in Python 2.7 it’s ok, but when I run it in Python 3.3 it says:
File “C:\Python33\lib\simplejson__init__.py”, line 111, in <module>
from decoder import JSONDecoder, JSONDecodeError
ImportError: No module named ‘decoder’
There is no need to use the external
simplejsonlibrary. Thejsonmodule included in the Python 3 standard library is the exact same module, but maintained as part of the Python distribution. Quoting from thesimplejsonPyPI page:Use the following code to switch to
simplejsonifjsonisn’t present (only for Python 2.5, the library is included in 2.6 and up):