Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
864 views
in Technique[技术] by (71.8m points)

windows - Installing pyinstaller via pip leads to "failed to create process"

Does anyone know why pyinstaller immediately fails after installed via pip via anaconda 32bit?

I installed pyinstaller via pip install pyinstaller through the anaconda command prompt on Windows 64 bit using 32 bit anaconda (because I want to create 32 bit executables)

Yes I read pyinstaller --version failed to create a process and pip/easy_install failure: failed to create process and How to install pyinstaller using pip

I did not rename any files I installed anaconda 15 mins ago, pycharm 10 mins ago, and pyinstaller 5 mins ago. I uninstalled pyinstaller via pup uninstall and reinstalled in the anaconda scripts folder, this did nothing.

Any insight anyone? #windowsfrustrations Path C:UsersmeAnacondaLibsite-packages>PyInstaller

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

[Update: So apparently the root fix for this is in setuptools. The fix went into setuptools version 24.3.1 released July 23, 2016. Upgrading to anything newer than that should take care of this.]

It turns out this is a bug in pip. As mentioned in the other answer it has a problem with spaces in the path to the python install.

Specifically it leaves out quote marks in the generated launcher scripts. The scripts can be found in Scripts (e.g. C:Program FilesPython 3.5Scripts). For pyinstaller there 4 pyi-* and a pyinstaller-script.py scripts.

You can work around this relatively easily by editing the first line of each script. The generated first lines will look something like:

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

Just add quotes around the shebang command, like so:

#!"c:program filespython 3.5python.exe"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.8k users

...