5
votes

I have test program below - I compiled the code with pyinstaller (Python ver 3.7b. windows 10 - 64bit) noticed warnings during compilations and error. I would appreciate any insight to resolving this issue.

Test.py
import encodings
print('Test')

Sample of Compilations Warning

102 INFO: PyInstaller: 3.3.1
102 INFO: Python: 3.7.0b1
104 INFO: Platform: Windows-10-10.0.14393-SP0
2771 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\apps\python\python37\python.exe
2801 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\apps\python\python37\python.exe

Error - executing the program Fatal Python error: initfsencoding:
unable to load the file system codec zipimport.ZipImportError:
can't find module 'encodings' Current thread 0x0000289c (most recent call first):

4

4 Answers

4
votes

I have the same error (zipimport.ZipImportError: can't find module 'encodings').

I think it has to do with Python 3.7 not supporting pyinstaller yet...

0
votes

I had the same problem and I resolve it by replacing Python 3.7, to Python 3.6.5 in my Windows 10 pro OS. During compilation of my python script using PyInstall i am still getting these WARNING: lib not found: api-ms-win-crtXXX... warnings, but the final executable works fine w/o any error.

0
votes

I also encountered the same error. I upgraded pyinstaller to the latest version[3.4] and the problem is solved. My environmental information is as follows: windows 7,python 3.7.0,pyinstaller 3.1. Reference source:zipimport.ZipImportError: can't find module 'encodings'

0
votes

Was trying to install Python and took the latest version (3.7.2). Got the same error (or while setting it up with the installer, gave the cryptic "Access Denied" issue, which led to a different set of issues/resolutions.

Finally, just changed to an earlier release (v3.5.2 for now) and that worked smoothly. Saves time, if you're trying to get other things done! As someone pointed out already, it probably has to do with PyInstaller not being supported (yet?)