Executable made with pyinstaller experiences “Fatal python error: initfsencoding”

感情迁移 提交于 2019-12-28 07:05:13

问题


I am able to run my python (python 3.7) program on my pc from sublime text. The program uses tkinter and sqlite3. Does pyinstaller not support them?

The error I'm getting when running it (by simply double-clicking the file created in dist:

Fatal Python error: initfsencoding: unable to load the file system codec 
zipimport.ZipImportError: can't find module 'encodings'

If anyone has some experience with this all help will be greatly appreciated!

I can post the code if the issue might be in the code itself.


回答1:


You are using python 3.7. As far as I have tested , modules like pyinstaller don't seem to be working in this version. Try uninstalling your python (don't forget to backup your files before), and installing python 3.6.3 or any other python 3 version except python 3.7. Same happened with me and I did this. It worked.



来源:https://stackoverflow.com/questions/51847455/executable-made-with-pyinstaller-experiences-fatal-python-error-initfsencoding

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!