Pyinstaller error: failed to create process

When you try to compile your scripts into an executable file, pyinstaller gives the following error message: failed to create process.

Typically, this happens when it is installed in a directory that has space. Example: C:\Program Files\…

To solve this issue, go to the directory where the pyinstaller is installed (C:\Program Files (x 86) \Python35-32\Scripts\) and edit the pyinstaller-script.py file.

The first lines will be similar to these:

#!c:\program files\python 3.5\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'PyInstaller==3.1.1','console_scripts','pyinstaller'

Add quotes to the first line, like this:

#!"c:\program files\python 3.5\python.exe"

Save the file and try again.

 

*Update: September 5th, 2018*

I have installer Python on a brand new Windows 10 machine and I got this error. When i checked pyinstaller-script.py, the path was already between double quotes.

To solve this, what I did was simple: Reinstalled pyinstaller. Yep, that worked with no side-effects whatsoever.

If you want to try this, here’s the commands:

pip uninstall pyinstaller
pip install pyinstaller

 

 

The following two tabs change content below.
Software Architect and Backend Developer (almost Fullstack), I usually work with C#, PowerShell, Python, Golang, bash and Unity (this one is more for a hobby). I'm always looking for something new to learn, adding new tools to my utility belt.
Posted in Dev, Python and tagged , , , , .