【发布时间】:2015-01-23 16:01:06
【问题描述】:
环境:Linux Mint 17 Cinnamon。
显示此错误:
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
在virtualenv 中尝试以下操作时:
pip install lxml
pip install pillow
pip install pycrypto
pip install pymongo (fails but still shows in pip freeze)
这里有几个解决方案推荐安装python2.7-dev:
Installing lxml in virtualenv via pip install error: command 'x86_64-linux-gnu-gcc' failed
Pillow installation error: command 'gcc' failed with exit status 1
fatal error: Python.h: No such file or directory
我对这个建议感到困惑,因为我的理解是使用类似的东西:
sudo apt-get install python2.7-dev
会将其添加到 Python 的主 *system* 实例中,而不是 virtualenv 中的那个。 (见-https://unix.stackexchange.com/a/56392/92486)
我可以将python2.7-dev 添加到Python 的virtualenv 版本吗?
【问题讨论】:
-
这应该移到 ServerFault 吗?
标签: python-2.7 pip virtualenv linux-mint