a-coder
a-coder

Reputation: 53

Running pyinstaller in a command prompt returns "failed to create process"

I am trying to convert my python file into a .exe, and I found out about pyinstaller. I ran in the command prompt:pip install pyinstaller. After a few seconds, the last line said something like "pyinstaller was successfully installed" then when I am running just "pyinstaller" in the command prompt, it prints "failed to create process.". I tried running it in the directory with the scripts, I tried doing "pyinstaller myprogram.py" in the directory of my program. I even went to windows 10, "Advanced system settings" and added the directory of my python scripts, but it always returns this "failed to create process." I looked at other questions in stackoverflow. I even looked at the first lines of scripts of the pyinstaller but they already had quotes, so I do not know what is wrong. Any reply would be appreciated.

Upvotes: 0

Views: 511

Answers (2)

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.
I would also suggest check you environemnt variables too carefully.

Upvotes: 0

a-coder
a-coder

Reputation: 53

It seems that this is a known issue with cx_Freeze which has been resolved in the source. It will be fixed in the new release (5.1.1)

Upvotes: 1

Related Questions