Pyinstaller error: failed to create process
Overview
Ever stumbled upon a pesky ‘failed to create process’ error while using PyInstaller? Fear not, for this blog post is here to guide you through a simple yet effective troubleshooting process. Whether it’s a path issue due to spaces or a need for reinstallation, we’ll walk you through the steps to get your scripts compiling smoothly again. So, grab a cup of coffee, and let’s dive into solving one of PyInstaller’s quirks together!
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:
<pre class="toolbar:2 lang:python decode:true">#!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:
<pre class="toolbar:2 lang:python decode:true">#!"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