2024-05-13 02:12:01 发布
网友
我正在尝试使用PyInstaller将python脚本转换为.exe。 脚本被转换为exe,没有任何错误日志。在
但是,在运行.exe文件时,am getModuleNotFoundError:没有名为'srsly.msgpack.util'
打开PyInstaller和cx_Freeze生成的exe文件时出现此问题。 The Screenshot of the error is attached here.
已尝试更新、卸载和重新安装程序包,但问题仍然存在。在
版本:
当PyInstaller评估脚本时,它没有预测srsly.msgpack.util. 您可以使用 hiddenimport手动指定依赖项。在
hiddenimport
pyinstaller hiddenimport srsly.msgpack.util your_script.py
你可能会发现解决这个问题只会暴露另一个问题。您可以根据需要添加任意数量的 hiddenimport提示。在
这里提到的问题是:https://pypi.python.org/pypi/msgpack/0.5.1
从msgpack-0.4或更早版本升级时,不要执行pip install-U msgpack python。执行pip卸载msgpack python;pip安装msgpack。在
当PyInstaller评估脚本时,它没有预测srsly.msgpack.util. 您可以使用
hiddenimport
手动指定依赖项。在你可能会发现解决这个问题只会暴露另一个问题。您可以根据需要添加任意数量的
hiddenimport
提示。在这里提到的问题是:https://pypi.python.org/pypi/msgpack/0.5.1
从msgpack-0.4或更早版本升级时,不要执行pip install-U msgpack python。执行pip卸载msgpack python;pip安装msgpack。在
相关问题 更多 >
编程相关推荐