环境:Linux Mint 17 Cinnamon.
显示此错误:
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
在以下情况下尝试以下内容时virtualenv:
pip install lxml
pip install pillow
pip install pycrypto
pip install pymongo (fails but still shows in pip freeze)
Run Code Online (Sandbox Code Playgroud)
这里有几个解决方案建议安装python2.7-dev:
安装Pillow错误:安装脚本退出并显示错误:命令'x86_64-linux-gnu-gcc'失败,退出状态为1
通过pip安装错误在virtualenv中安装lxml:命令'x86_64-linux-gnu-gcc'失败
我对这个建议很困惑,因为我的理解是使用类似的东西:
sudo apt-get install python2.7-dev
Run Code Online (Sandbox Code Playgroud)
将它添加到Python的main*system*实例中,而不是将其添加到Python中virtualenv.(见 - https://unix.stackexchange.com/a/56392/92486)
我可以python2.7-dev只添加到virtualenvPython 的版本吗?
我试图安装"学术"包,但我一直收到这个错误:
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/_openssl.c -o build/temp.linux-x86_64-2.7/build/temp.linux-x86_64-2.7/_openssl.o
build/temp.linux-x86_64-2.7/_openssl.c:434:30: fatal error: openssl/opensslv.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Command "/usr/bin/python -u -c "import setuptools,tokenize;__file__='/tmp/pip-build-0OXGEx/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EdgZGB-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-0OXGEx/cryptography/
Run Code Online (Sandbox Code Playgroud)
已经尝试过以下帖子中的解决方案,但它没有用: