2016-03-25 7 views
7

OS X 10.11のvirtualenvにpipを使用して治療をインストールしていました。
それが暗号をインストールしています、それは言った:私はそれを修正助けることができるOS Xのvirtualenvで暗号化の暗号化をインストールするときにエラーが発生する

building '_openssl' extension 
    cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c build/temp.macosx-10.11-intel-2.7/_openssl.c -o build/temp.macosx-10.11-intel-2.7/build/temp.macosx-10.11-intel-2.7/_openssl.o 
    build/temp.macosx-10.11-intel-2.7/_openssl.c:423:10: fatal error: 'openssl/e_os2.h' file not found 
    #include <openssl/e_os2.h> 
     ^
    1 error generated. 
    error: command 'cc' failed with exit status 1 

    ---------------------------------------- 
Command "/Users/Kris/Workspace/env/scrapy/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/wx/jm7lxhps3n7484zl4gv9s3180000gn/T/pip-build-2rJYgI/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/wx/jm7lxhps3n7484zl4gv9s3180000gn/T/pip-nXp2mE-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/Kris/Workspace/env/scrapy/include/site/python2.7/cryptography" failed with error code 1 in /private/var/folders/wx/jm7lxhps3n7484zl4gv9s3180000gn/T/pip-build-2rJYgI/cryptography 

任意の提案を?
私はvirtualenvせずに治療をインストールしていたときに、すべてうまくいった。

+0

まあを助けるかもしれない、あなたは、すべての依存関係(特にSSL関連のもの)がインストールされていることを確認していますか? –

+2

あなたがhomebrewを実行している場合は、blu install openssl && env LDFLAGS = " - L $(brew --prefix openssl)/ lib" CFLAGS = " - I $(brew --prefix openssl)/ include" pip install cryptography - see https://cryptography.io/en/latest/installation/#building-cryptography-on-os-x – Damian

答えて

15
pip install --upgrade pip 

+2

しかし、そうではありません。 –

+4

代わりに次の行も私のために働いています: 'brew install openssl && Brewリンクopenssl --force' – madzohan

+0

@madzohanそれは動作します。 – giaosudau

関連する問題