pip安装openssl/aes.h错误和libxml/xmlversion.h错误(osx)

2024-09-26 22:11:02 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个'要求.txt'文件和我pip安装它。并继续得到这些错误:

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

这个错误:

^{pr2}$

尝试https://github.com/pyca/cryptography/issues/2350


Tags: pip文件txtinclude错误noterrorcffi
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。在

我做了两件事来解决这个问题。在

brew link  force openssl

以及

^{pr2}$

相关问题 更多 >

    热门问题