sew*_*dio 6 python packages pyinstaller cx-freeze python-2.7
我用这样的pyinstaller制作了可执行文件(没有--onefile或其他选项)
> pyinstaller brdg2.py
Run Code Online (Sandbox Code Playgroud)
当我运行它时,这就是我得到的 (命令提示符关闭之前的屏幕截图).
从其他线程来看,一开始的警告似乎是可以忽略的,所以问题就出现了
ImportError: No module named htmlentitydefs
Run Code Online (Sandbox Code Playgroud)
编辑:我使用cx_freeze创建的.exe 获得相同的 ImportError,因此它似乎与打包程序无关.
另外要添加一些信息,我刚刚重新安装了Python和必要的模块,并且在执行相同的操作之前我没有得到这个错误(虽然我确实得到了其他错误).
htmlentitydefs 模块在 Python 3 中已重命名为 html.entities。在将源代码转换为 Python 3 时,2to3 工具将自动调整导入。
使用html.entities而不是htmlentitydefs
https://docs.python.org/3/library/html.entities.html
| 归档时间: |
|
| 查看次数: |
5516 次 |
| 最近记录: |