ptlud
ptlud

Reputation: 41

pyinstaller --version failed to create a process

I would like to use PyInstaller to create a Windows executable. I installed pyinstaller using pip, as well as the correct version of pywin32.

When I attempt to verify the pyinstaller installation by typing pyinstaller --version, I get the message failed to create a process.

What am I doing wrong? Thanks in advance for your help.

Upvotes: 4

Views: 4051

Answers (2)

LightCC
LightCC

Reputation: 11639

You can always reinstall pyinstaller:

python -m pip uninstall pyinstaller
[output of uninstall]
python -m pip install pyinstaller

where python is the command you use to run the python version of your choice (py, python, python3, etc.).


Notes:

  • Moving or changing exe names (i.e. the python.exe filename), folders, etc. can cause issues, per the other answer. If you want to make changes to the python exe or it's location, you typically need to do that immediately upon install, before installing any other packages.
  • There are ways of recording all your existing packages (See PIP Freeze) to a requirements.txt file, and then reinstalling them later, for another version of Python or to a new virtual environment.
  • If you are not familiar with virtual environments, you can start learning in the Python venv package docs. Note that you should never rename or move a venv folder after creating it (but it's easy to create a new one and reinstall the packages).

Upvotes: 0

HelloWorld101
HelloWorld101

Reputation: 4366

There could be two reasons:

1) The python install location has spaces. See the answer at https://stackoverflow.com/a/34546220/3559967

2) You renamed the python install location. See the answer at https://stackoverflow.com/a/17560177/3559967

Upvotes: 2

Related Questions