1

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.

piet.t
  • 11,718
  • 21
  • 43
  • 52
Haukland
  • 677
  • 8
  • 25
  • 1
    Thats the problem with the `pyinstaller` , not with `tkinter` or other module. I am sure that you are using `python 3.7`. Try uninstalling your python (recover your files before), and install [`python 3.6.3`](https://www.python.org/downloads/release/python-363/). – Nouman Aug 14 '18 at 18:12
  • Edited to include python version. Yes, I am running 3.7. Why `python 3.6.3` ? – Haukland Aug 14 '18 at 18:14
  • 1
    Well, I don't know the answer too , you can try using any python 3.6 version except 3.7. Same happened with me when I was coding this [GUI application](https://github.com/BlackSkull01001/cx_freeze_GUI/) which also uses a module similiar to `pyinstaller` i.e. `cx_Freeze` – Nouman Aug 14 '18 at 18:26
  • Oh my god it worked! Thank you! Post it as an answer and I will accept it. – Haukland Aug 14 '18 at 18:45

1 Answers1

3

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.

Nouman
  • 6,947
  • 7
  • 32
  • 60