python - 一次安装三个软件包失败 : "pip install numpy pil aptus" but individually they work, 为什么?

标签 python numpy installation virtualenv pip

日志和更多详细信息位于:https://gist.github.com/2890621

stu@vervet ~ $ virtualenv --no-site-packages testingpip
New python executable in testingpip/bin/python
Installing distribute......................done.
stu@vervet ~ $ source testingpip/bin/activate
stu@vervet ~ $ which pip
/home/stu/testingpip/bin/pip
stu@vervet ~ $ which python
/home/stu/testingpip/bin/python
stu@vervet ~ $ pip --log=piplog.log install numpy pil aptus
Downloading/unpacking numpy
...
...
...

最终命令因 numpy 依赖而失败

但正在做:

stu@vervet ~ $ pip install numpy
stu@vervet ~ $ pip install pil
stu@vervet ~ $ pip install aptus

有效

最佳答案

这是由 this line 引起的在 Aptus setup.py 文件中。

您应该将其报告为 Aptus 的错误。如果 Aptus 依赖于 numpy,它应该将其添加到其依赖项列表中,而不是在安装过程中抛出异常。

Aptus 应该修补为如下内容:

install_requires = []

try: import numpy
except ImportError: install_requires.append('numpy')

setup(
    ...
    install_requires=install_requires,
    ...
)

关于python - 一次安装三个软件包失败 : "pip install numpy pil aptus" but individually they work, 为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10937735/

相关文章:

python - 具有不可迭代对象的 python 类中的错误

python - 用一个值替换一系列值

python - numpy 中最接近的 0.2 倍数?

python - 在 NumPy 数组的可变位置插入新轴

android - Xamarin 安装和更新不断崩溃

python - 合并字典上的键 - Python

python - Django - 装饰器限制 "staff"

python - R 的 which() 和 which.min() 在 Python 中等价

installation - 在 CentOS 5.5 上安装 MonoDevelop

python - 在 macOS 上安装 rpy2——R_HOME 变量的问题