【发布时间】:2018-01-23 09:24:28
【问题描述】:
我正在尝试安装我找到的代理重新加密方案的 python 实现here。
在运行$ sudo python setup.py install 时,我返回一个错误
fatal error: 'openssl/aes.h' file not found
周围有一些这样的问题(this 或 this(不适用于 mac)),但没有一个答案能解决我的问题。
我试过了(全部取自我找到的答案):
- 运行
env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography并重试; -
brew install openssl再试一次; -
brew reinstall python再试一次;
选项 1. 返回
Requirement already satisfied: cryptography in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Requirement already satisfied: six>=1.4.1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: setuptools>=11.3 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: cffi>=1.4.1 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: pyasn1>=0.1.8 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: enum34 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: ipaddress in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: idna>=2.0 in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cryptography)
Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from cffi>=1.4.1->cryptography)
我正在运行 OSX 10.12.6。
有什么想法吗?
【问题讨论】:
-
sudo丢掉了很多普通用户的环境。除非您使用像-e和-E(IIRC) 这样的选项,否则像env LDFLAGS=...这样的东西会消失。在非特权帐户下构建东西,并使用 root 安装。
标签: python macos encryption openssl