I have created a .exe file of a simple script with intentions to run it on a server however I cannot seem to figure out what this fault means or find any answers online. The fault code is as follows:
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00003c8c (most recent call first):
To get this far I used pyinstaller
pyinstaller --onefile MyScript.py
When this didn't work I also tried
pyinstaller MyScript.py
I am running on windows 10, python 3.7 within admin command prompt, within a C: file directory.
My sys.path is
['', 'C:UsersuserAppDataLocalProgramsPythonPython37-32python37.zip', 'C:UsersuserAppDataLocalProgramsPythonPython37-32DLLs', 'C:UsersuserAppDataLocalProgramsPythonPython37-32lib', 'C:UsersuserAppDataLocalProgramsPythonPython37-32', 'C:UsersuserAppDataRoamingPythonPython37site-packages', 'C:UsersuserAppDataLocalProgramsPythonPython37-32libsite-packages', 'C:UsersuserAppDataLocalProgramsPythonPython37-32libsite-packageswin32', 'C:UsersuserAppDataLocalProgramsPythonPython37-32libsite-packageswin32lib', 'C:UsersuserAppDataLocalProgramsPythonPython37-32libsite-packagesPythonwin']
Any help is appreciated
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…