[英]PyInstaller - No module named 'codecs'
My script literally looks like this (Python 3.5):我的脚本看起来像这样(Python 3.5):
print("Hello world")
Building it with PyInstaller (version 3.5 I guess?) ( pyinstaller --onefile test.py
or even pyinstaller test.py
) results in an error:使用 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'.
I'm kinda new to Python, so I don't know what could be causing the problem nor do I know how to fix it.我对 Python 有点陌生,所以我不知道是什么导致了问题,也不知道如何解决它。 Any ideas?有任何想法吗?
What version of PyInstaller are you using?您使用的是哪个版本的 PyInstaller? I think there might be a bug on older versions that could cause this error.我认为旧版本可能存在导致此错误的错误。
Try running "pip install --upgrade pyinstaller".尝试运行“pip install --upgrade pyinstaller”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.