Home  >  Q&A  >  body text

python - pycharm reports an error when running: unable to load the file system codec ImportError?

I installed several versions of python before, but I uninstalled them all because they were too messy. Now after installing python3.4.3,
it works fine when typing python in cmd

But an error is reported when running an empty file in pycharm
Error message:
Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

Current thread 0x000033c4 (most recent call first):

仅有的幸福仅有的幸福2712 days ago2038

reply all(2)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-18 10:56:04

    Set your python interpreter path in the project structure in pycharm. If it still doesn't work, add environment variables to the running of python. If it doesn’t work, you can try to install this module through the install repo in pycharm

    reply
    0
  • 阿神

    阿神2017-05-18 10:56:04

    Install it once with administrator rights, and then try configuring the environment variables

    reply
    0
  • Cancelreply