Owen Walker
Owen Walker

Reputation: 75

python 3 pyinstaller consistently gives "failed to create process"

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?

Upvotes: 2

Views: 5271

Answers (4)

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

Upvotes: 4

H S Umer farooq
H S Umer farooq

Reputation: 1081

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.

Upvotes: 1

JasonD
JasonD

Reputation: 114

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"

pip/easy_install failure: failed to create process

Upvotes: -1

Shadow
Shadow

Reputation: 9427

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.

Upvotes: -1

Related Questions