2016-01-26 62 views
3

我有'requirements.txt'文件,我點安裝它。並不斷地得到這些錯誤:pip安裝openssl/aes.h錯誤和libxml/xmlversion.h錯誤(osx)

Cryptography_cffi_a269d620xd5c405b7.c:217:10: fatal error: 'openssl/aes.h' file not found 
#include <openssl/aes.h> 
     ^
1 error generated. 
error: command 'clang' failed with exit status 1 

而這個錯誤:

fatal error: 'libxml/xmlversion.h' file not found 
#include "libxml/xmlversion.h" 
     ^
1 error generated. 
error: command 'clang' failed with exit status 1 

試圖https://github.com/pyca/cryptography/issues/2350

回答

2

我做了兩件事情來解決這個問題了。

brew link --force openssl 

xcode-select --install 
2

現在,不幸的是,我們不能brew link --force openssl。所以你也可以設置如下的環境變量:

export LD_LIBRARY_PATH=/usr/local/opt/openssl/lib:$LD_LIBRARY_PATH 
export CPATH=/usr/local/opt/openssl/include:$LD_LIBRARY_PATH 

And do pip install