执行pip3 install cryptography
时, pip3
报错:
fatal error: 'openssl/aes.h' file not found
#include <openssl/aes.h>
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
我检查了 brew info openssl
得到了答案:
Generally there are no consequences of this for you. If you build your own software and it requires this formula, you'll need to add to your build variables:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
现在的问题是:我怎么知道pip
使用 clang
时将路径添加到相应的构建变量中编译cpp文件?
最佳答案
尝试安装 scrapy 我需要在 Mac OS El Capitan 上安装加密包。如密码学安装文档中所述
env LDFLAGS="-L$(brew --prefix openssl)/lib"CFLAGS="-I$(brew --prefix openssl)/include"pip install cryptography
关于python - 如何在 Mac OS X 中为 python3 安装密码学?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33688875/