我的脚本字面上看起来像这样(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比较陌生,所以我不知道是什么导致了这个问题,也不知道如何修复它。有什么想法吗?
发布于 2020-01-09 01:40:04
您使用的是什么版本的PyInstaller?我认为旧版本上可能有一个bug,可能会导致这个错误。
尝试运行"pip install --upgrade pyinstaller“。
https://stackoverflow.com/questions/59650822
复制相似问题