python - Google App Engine 本地开发服务器 SSL 警告(Python 2.7)

标签 python google-app-engine ssl

每次我将我的应用程序上传到 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/

相关文章:

java - 如何让 App Engine cron 作业显示在 Web 界面的 "scheduled tasks"选项卡中?

java - 本地镜像上传未显示在 Google App Engine 上

c# - SSL 的谷歌图表

python - 将 PyQt5 QPixmap 转换为 numpy ndarray

Python IDLE 与多线程兼容吗?

google-app-engine - panic : open templates/base. html: 系统找不到指定的路径

ssl - 如何在没有可导出私钥的情况下进行 ECDHE 握手

python - 获取数据框中n个最大值的行和列名称

python - 通过匹配字典值来查找列表中字典的定义键的值

Python 无法将请求绑定(bind)到网络接口(interface)