pyinstaller制作的可执行文件遇到“致命的python错误:initfsencoding”
我可以通过崇高的文本在我的PC上运行python(python 3.7)程序。该程序使用tkinter和sqlite3。pyinstaller不支持它们吗?
运行它时出现的错误(只需双击在中创建的文件dist
:
Fatal Python error: initfsencoding: unable to load the file system codec
zipimport.ZipImportError: can't find module 'encodings'
如果有人对此有任何经验,将不胜感激!
如果问题可能出在代码本身中,我可以发布代码。
-
您正在使用
python 3.7
。据我测试,类似的模块pyinstaller
似乎在此版本中不起作用。尝试卸载python(不要忘了之前备份文件),然后安装python 3.6.3
或安装其他python 3
版本python 3.7
。我也发生了同样的事情,我做到了。有效。