Python PyInstaller-没有名为“编解码器”的模块

Python PyInstaller-没有名为“编解码器”的模块,python,pyinstaller,Python,Pyinstaller,我的脚本看起来就像Python 3.5: print("Hello world") 我想是用PyInstaller版本3.5构建的吧?pyinstaller-onefile test.py甚至pyinstaller test.py会导致错误: Fatal Python error: Py_Initialize: unable to load the file system codec Traceback (most recent call last): File "encodings\__

我的脚本看起来就像Python 3.5:

print("Hello world")
我想是用PyInstaller版本3.5构建的吧?pyinstaller-onefile test.py甚至pyinstaller test.py会导致错误:

Fatal Python error: Py_Initialize: unable to load the file system codec
Traceback (most recent call last):
  File "encodings\__init__.py", line 31, in (module)
ImportError: No module named 'codecs'.

我对Python有点陌生,所以我不知道是什么导致了这个问题,也不知道如何修复它。有什么想法吗?

您使用的是什么版本的PyInstaller?我认为旧版本上可能存在导致此错误的bug


尝试运行pip安装-升级pyinstaller。

我今天刚安装了pyinstaller,因此跳过了所有升级。