内容简介:在这是因为找不到如果安装完成以后还是会出现上面的错误的话,就是环境变量的问题了,需要重新指定
在 Mac
下面安装 cryptography
依赖包,始终报错,出现 'openssl/opensslv.h' file not found
的错误。
$ pip install cryptography
...
building '_openssl' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c build/temp.macosx-10.12-intel-2.7/_openssl.c -o build/temp.macosx-10.12-intel-2.7/build/temp.macosx-10.12-intel-2.7/_openssl.o
build/temp.macosx-10.12-intel-2.7/_openssl.c:434:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
...
这是因为找不到 openssl
的头文件,可以使用 brew
命令进行安装:
$ brew install openssl
如果安装完成以后还是会出现上面的错误的话,就是环境变量的问题了,需要重新指定 openssl
的路径安装:
$ env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography
这样就可以搞定了~~~
以上所述就是小编给大家介绍的《Mac 下安装 cryptography 失败》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- Win2016上安装SFB2015先决条件安装失败:RewriteModule
- PHPRAP 1.0.2 发布,修复安装失败 Bug 和优化细节
- go get 安装一个特定版本的包失败解决方法
- mysql5.7.18安装时mysql服务启动失败的解决方法
- vim-go ctrl+] 自动跳转失败处理 安装gure
- chaincode安装失败:Error getting chaincode code chaincode: <go, [env]>: failed with error: ...
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Spring框架高级编程
约翰逊 / 蒋培 / 机械工业出版社 / 2006-4 / 59.00元
Spring框架是主要的开源应用程序开发框架,它使得Java/J2EE开发更容易、效率更高。本书不仅向读者展示了Spring能做什么?而且揭示了Spring完成这些功能的原理,解释其功能和动机,以帮助读者使用该框架的所有部分来开发成功的应用程序。本书涵盖Spring的所有特性,并且演示了如何将其构成一个连贯的整体,帮助读者理解Spring方法的基本原理、何时使用Sping以及如何效仿最佳实践。所有......一起来看看 《Spring框架高级编程》 这本书的介绍吧!