我有一个'requirements.txt'文件,我点了安装它。并继续得到这些错误:
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 后
答案 0 :(得分:2)
我做了两件事来解决这个问题。
brew link --force openssl
和
xcode-select --install
答案 1 :(得分: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
做pip install
。