Most of the time these are dependency-issues.

Following the stack-trace of the gcc compiler one can see the missing files. Sometimes installing the Python development packages is not enough.

For example: I tried to do pip install requests[security] in my virtualenv foo. This is the result that the pip-installer gave me.

Failed building wheel for cryptography
Running setup.py bdist_wheel for cffi
Stored in directory: /root/.cache/pip/wheels/99/e7/9a/68b1c8ca6f6f92b5feebd4d9434f50712b84f6a66d1285ea21
Successfully built cffi
Failed to build cryptography
Installing collected packages: cffi, cryptography, pyOpenSSL, ndg-httpsclient, requests
Running setup.py install for cryptography
Complete output from command /opt/foo/django-cms-virtualenv/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-eZaLAG/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-BwgYTp-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/foo/django-cms-virtualenv/include/site/python2.7/cryptography:
running install
running build
running build_py
running egg_info
writing requirements to src/cryptography.egg-info/requires.txt
writing src/cryptography.egg-info/PKG-INFO
writing top-level names to src/cryptography.egg-info/top_level.txt
writing dependency_links to src/cryptography.egg-info/dependency_links.txt
writing entry points to src/cryptography.egg-info/entry_points.txt
warning: manifest_maker: standard file '-c' not found reading manifest file 'src/cryptography.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'docs/_build'
warning: no previously-included files matching '*' found under directory 'vectors'
writing manifest file 'src/cryptography.egg-info/SOURCES.txt'
running build_ext
building '_Cryptography_cffi_a269d620xd5c405b7' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_a269d620xd5c405b7.c -o build/temp.linux-x86_64-2.7/src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_a269d620xd5c405b7.o
src/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_a269d620xd5c405b7.c:217:25: fatal error: openssl/aes.h: Datei oder Verzeichnis nicht gefunden
#include <openssl/aes.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

The important part is the: #include <openssl/aes.h>

The compiler makes pretty clear that it is demanding this file - but it is not there in the filesystem.

Knowing that, the only thing left to do is: install the needed libraries!

  1. Find out which package is needed for your distribution: e.g. for Ubuntu you can go to The Ubuntu Package Search Site and enter the missing file you are looking for. In this case "aes.h"
  2. Install the needed packages using your distributions package management tool: e.g. for Ubuntu:

    aptitude install libssl-dev

  3. Retry with pip in your virtualenv:

“error: command 'x86_64-linux-gnu-gcc' failed with exit status 1” in virtualenv的更多相关文章

  1. Centos4.3安装MySQL-python-1.2.3,出现error: command 'gcc' failed with exit status 1

    在Linux Centos 4.3上安装MySQL-python-1.2.3的时候出现error: command 'gcc' failed with exit status 1, 具体原因是因为没有 ...

  2. error: command 'gcc' failed with exit status 1

    MacOS下想安装MySQL-Python,执行语句: sudo pip install MySQL-Python 遇到了如下错误信息: /Users/kaitlyn/anaconda3/envs/e ...

  3. pip error: command 'gcc' failed with exit status 1

    SWIG/_m2crypto_wrap.c:127:20: 致命错误:Python.h:没有那个文件或目录     #include <Python.h>                  ...

  4. mysql_config not found和error: command 'gcc' failed with exit status 1

    要想使python可以操作mysql 就需要MySQL-python驱动,它是python 操作mysql必不可少的模块. 下载地址:https://pypi.python.org/pypi/MySQ ...

  5. 【centos】 error: command 'gcc' failed with exit status 1

    原文连接http://blog.csdn.net/fenglifeng1987/article/details/38057193 用安装Python模块出现error: command 'gcc' f ...

  6. centos7 安装mysql--python模块出现EnvironmentError: mysql_config not found和error: command 'gcc' failed with exit status 1

    要想使python可以操作mysql 就需要MySQL-python驱动,它是python 操作mysql必不可少的模块. 下载地址:https://pypi.python.org/pypi/MySQ ...

  7. python安装模块的时候报错error: command 'gcc' failed with exit status 1

    [情况] 在写Python代码的时候,需要用到psutil模块,需要安装. 但是在安装时,报错:error: command 'gcc' failed with exit status 1 [解决步骤 ...

  8. pip安装模块时:error: command 'gcc' failed with exit status 1

    用安装python模块出现error: command 'gcc' failed with exit status 1 问题: gcc编译缺少模块 解决方法: yum install gcc libf ...

  9. python psutil 编译中断。 error: command 'gcc' failed with exit status 1

    error info [root@chenbj psutil-2.0.0]# python setup.py install running install running bdist_egg run ...

  10. pycuda installation error: command 'gcc' failed with exit status 1

    原文:python采坑之路 Setup script exited with error: command 'gcc' failed with exit status 1 伴随出现"cuda ...

随机推荐

  1. BeeProg2C Extremely fast universal USB interfaced programmer

    http://www.elnec.com/products/universal-programmers/beeprog2c/ FPGA based totally reconfigurable 48  ...

  2. Spring Boot Jar包转War包 部署到Tomcat下

    原文:https://my.oschina.net/sdlvzg/blog/1562998 我们都知道springBoot中已经内置了tomcat,是不需要我们额外的配置tomcat服务器的,但是有时 ...

  3. powerdesigner 设置字段显示comment注释

    在Columns标签下,一排按钮中找到这个按钮:Customize Columns and Filter

  4. Android中UI设计的一些技巧!!!

    出处:http://blog.csdn.net/android_tutor/article/details/5995759 大家好,今天给大家分享的是Android中UI设计的一些技巧,本节内容主要有 ...

  5. springboot2.X 在项目启动后执行一段自定义代码

    场景: 项目需要在项目启动后从数据库初始化一些数据进入redis , 但是没有很适合 的监听器去实现 , 监听 老是在dao初始化之前触发. 解决方法:自定义类实现 ApplicationRunner ...

  6. pytest文档23-使用多个fixture和fixture直接互相调用

    使用多个fixture 如果用例需要用到多个fixture的返回数据,fixture也可以return一个元组.list或字典,然后从里面取出对应数据. # test_fixture4.py impo ...

  7. Animatepacker for cocos2d-x 3.0 解析

    AnimatePacker 是大神老G为cocos2d-x2.0做的一个很简洁的工具 近期 e 的新项目用的是最新的cocos2d-x 3.0,因此改进了对应的解析代码 说明: 1.工具还是用的之前的 ...

  8. FFmpeg深入分析之零-基础

    FFmpeg是相当强大的多媒体编解码框架,在深入分析其源代码之前必须要有基本的多媒 体基础知识,否则其源代码会非常晦涩难懂.本文将从介绍一些基本的多媒体只是,主要是为研读ffmpeg源代码做准备,比如 ...

  9. NFV/SDN驱动OSS转型

  10. JAVA常见算法题(三十三)---求子串在字符串中出现的次数

    计算某字符串中子串出现的次数. public static void main(String[] args) { String s1 = "adcdcjncdfbcdcdcd"; ...