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

问题描述 投票:0回答:1

我的脚本从字面上看是这样的(Python 3.5):

print("Hello world")

[使用PyInstaller(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的新手,所以我不知道是什么引起了该问题,也不知道如何解决该问题。有什么想法吗?

python pyinstaller
1个回答
0
投票

您正在使用哪个版本的PyInstaller?我认为旧版本可能存在错误,可能会导致此错误。

© www.soinside.com 2019 - 2024. All rights reserved.