ERROR: Failed building wheel for pycryptodome pip安装出错 解决
一、问题
pip安装 pycryptodome 时build wheel错误 错误堆栈显示引用openssl出错
ERROR: Failed building wheel for pycryptodome
二、解决方案
# ①、安装brew
# ②、安装openssl@1
# ③、链接openssl地址
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include"
三、其他收集信息
对于使用 Apple Silicon 的设备,您可以试试这个(因为默认的 homebrew bin 目录不同)
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
可以自己输入查看命令
brew info openssl
如果您要安装旧版本cryptography(如 2.9.x),则必须链接openssl@1.1而不是openssl@3
brew install openssl
的时候就会提示你export