每次我将我的应用程序上传到 Google App Engine 时,日志总是显示此警告:
WARNING appengine_rpc.py:435 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 2.7 运行 virtualenv
。当我在里面的时候,我试着跑
$ pip install ssl
但这会产生错误:
ValueError: This extension should not be used with Python 2.6 or later
(already built in), and has not been tested with Python 2.3.4 or earlier.
如果 ssl
内置于 Python 2.7,我如何告诉本地开发服务器使用内置的 ssl
模块?
最佳答案
听起来 appcfg.py 没有正确使用你的 virtualenv。您可以尝试编辑 appcfg.py 脚本,使其打印 sys.version 和 sys.path,以确认它正在正确使用您的 virtualenv。 (shebang 行是“#!/usr/bin/env python”,因此应该使用您的事件环境,但值得检查。)
如果您使用启动器,您需要明确告诉它在哪里寻找您的 virtualenv 的 Python。转到首选项,并将 Python 路径设置为您的 virtualenv 的 Python 2.7。启动器在日志中打印它正在使用的 Python 路径(至少在启动开发服务器时)。
关于python - Google App Engine 本地开发服务器 SSL 警告(Python 2.7),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9045924/