gpt4 book ai didi

python - 如何在 OSX 上安装 Python SSL 模块?

转载 作者:太空狗 更新时间:2023-10-30 02:23:36 26 4
gpt4 key购买 nike

当我部署我的谷歌应用引擎项目时,我收到以下警告:

WARNING appengine_rpc.py:399 ssl module not found.
Without the ssl module, the identity of the remote host cannot be verified, and
connections may NOT be secure. To fix this, please install the ssl module from
http://pypi.python.org/pypi/ssl.

我下载了包,但是当我尝试的时候

python setup.py build

我得到以下错误输出:

looking for /usr/include/openssl/ssl.h
looking for /usr/local/ssl/include/openssl/ssl.h
looking for /usr/contrib/ssl/include/openssl/ssl.h
Traceback (most recent call last):
File "setup.py", line 167, in <module>
ssl_incs, ssl_libs, libs = find_ssl()
File "setup.py", line 142, in find_ssl
raise Exception("No SSL support found")
Exception: No SSL support found

我需要做什么来安装它,是路径问题还是什么?

最佳答案

按照 here 中的说明首先安装 pycrypto 进行修复并利用对 this question 的回答中的洞察力.

我用于最终构建的完整命令行是:

CC='/usr/bin/gcc-4.0' python2.5 setup.py build

关于python - 如何在 OSX 上安装 Python SSL 模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3078403/

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