1
我试图安装一个代理重新加密方案的python实现,我发现here。在Mac上找不到openssl/aes.h'文件
当运行$ 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'下降了很多普通用户的环境。像'env LDFLAGS = ...'之类的东西就会消失,除非你使用诸如'-e'和'-E'(IIRC)之类的选项。在非特权帐户下构建事物,并使用root进行安装。 – jww