gpt4 book ai didi

python - 如何在 Mac OS X 中为 python3 安装密码学?

转载 作者:太空宇宙 更新时间:2023-11-04 07:36:34 25 4
gpt4 key购买 nike

执行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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com