通过pip安装pyinstaller会导致“创建过程失败". [英] Installing pyinstaller via pip leads to "failed to create process"

查看:97
本文介绍了通过pip安装pyinstaller会导致“创建过程失败".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道为什么pyinstaller通过pip通过pip安装后立即失败吗?

我在Windows 64位上使用32位anaconda在Windows 64位上通过anaconda命令提示符通过pip install pyinstaller安装了pyinstaller(因为我想创建32位可执行文件)

是的,我阅读了 pyinstaller --version无法创建进程 pip/easy_install失败:无法创建进程,并且如何使用pip安装pyinstaller

我没有重命名15分钟前安装的anaconda,10分钟前的pycharm和5分钟前的pyinstaller的文件.我通过pup卸载方式卸载了pyinstaller,然后将其重新安装在anaconda脚本文件夹中,此操作无济于事.

有见识的人吗? #windowsfrustrations 小路 C:\Users\me\Anaconda\Lib\site-packages>PyInstaller

解决方案

[更新:显然,此问题的根本解决方法是在setuptools中.该修复程序已包含在2016年7月23日发布的setuptools版本24.3.1中.升级到比此更新的版本都可以解决此问题.

事实证明,这是一个 pip错误.如另一个答案中所述,它在python安装路径中存在空格问题.

具体地说,它在生成的启动器脚本中省略了引号.脚本可以在\ Scripts \中找到(例如C:\ Program Files \ Python 3.5 \ Scripts).对于pyinstaller,有4个pyi- *和pyinstaller-script.py脚本.

您可以通过编辑每个脚本的第一行相对容易地解决此问题.生成的第一行将类似于:

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

只需在shebang命令周围添加引号,就像这样:

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

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:\Users\me\Anaconda\Lib\site-packages>PyInstaller

解决方案

[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 Files\Python 3.5\Scripts). 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 files\python 3.5\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'PyInstaller==3.1.1','console_scripts','pyinstaller'

Just add quotes around the shebang command, like so:

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

这篇关于通过pip安装pyinstaller会导致“创建过程失败".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆