I have pyinstaller in my basic c:\ folder, myfile.py in my c: Pyinstaller folder and both pyinstaller myfile,py and pyinstaller pyinstaller\myfile.py give "failed to create process" What am I doing wrong?
-
Does this mean you can't even run your python script (without using pyinstaller)? If not this is probably related to your write access at the script folder. – Repiklis Sep 16 '16 at 10:04
4 Answers
If none of the above methods work, try directly calling the python exe file and pyinstaller-script file.
<absolute path to python exe> <absolute path to pyinstaller script> <yourfile>.py
As an example,
"C:\Users\Dilan Sachintha\AppData\Local\Programs\Python\Python37\python.exe" "C:\Users\Dilan Sachintha\AppData\Local\Programs\Python\Python37\Scripts\pyinstaller-script.py" --onefile temp.py

- 562
- 6
- 14
I had the same issue so I checked the file
C:\Python27\Scripts\pyinstaller-script.py
and there was an old python path which when I installed python installer
C:\Python27\python.exe
But later I renamed python.exe --> python2.exe, so I just changed the path
C:\Python27\python.exe --> C:\Python27\python2.exe
in file
C:\Python27\Scripts\pyinstaller-script.py
and it worked perfectly.

- 981
- 1
- 8
- 14
You seem to be doing everything from C: - which is a protected area on any up to date version of windows.
I would suggest moving it somewhere more accessible, such as your documents folder or even your desktop. It could just be a permissions issue.
Alternatively, you could try running pyinstaller as an admin. Usually this can be done by right clicking the executable and selecting Run as administrator
.

- 8,749
- 4
- 47
- 57
You are probably experiencing a bug with PyInstaller (#1832) that causes PyInstaller to crash with the "failed to create process" error when there is a space in the path to your .py file.
Try moving the file to a folder that has no spaces in it and try again.
Also, look here:
Installing pyinstaller via pip leads to "failed to create process"
-
I don't see any spaces at the folders he is using. Also your links point to different issues and solutions. – Repiklis Sep 16 '16 at 10:08
-
He doesn't give his full path, and the links point to issues with PyInstaller "failed to create process" - how is that a different issue? – JasonD Sep 16 '16 at 10:17
-
He gives some paths, but I can't see a space in those. If the question is missing something, post a comment. Both links indicate issues with pip and not a pyinstaller bug. – Repiklis Sep 16 '16 at 10:34
-
The only problems I have ever encountered with this error, and the only problems I could find with this error, point to spaces in the path. Does this come from the Pip installation? Sure. How many people do you know of who, on windows, use something else to install python packages? It's not as if they have access to apt, yum or any other easy way to do it. – JasonD Sep 16 '16 at 10:39