Google App Engine Launcher 告诉我:
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 .
我下载了这个包,它包含一个 setup.py
文件。我跑了:
python setup.py install
然后:
Python was built with Visual Studio 2003; blablabla use MinGW32
然后我安装了MinGW32,现在编译不起作用。编译错误结尾包含:
ssl/_ssl2.c:1561: error: `CRYPTO_LOCK' undeclared (first use in this function)
error: command 'gcc' failed with exit status 1
我该怎么办?
最佳答案
捕获openssl和 libgw32c来自 gnuwin32 项目的软件包(下载“开发人员文件”!)并将它们提取到您安装 gnuwin32 的位置 - 或者如果您还没有 gnuwin32 工具,您可以将其提取到任何地方(例如“C:\Program Files\gnuwin32”) .进入“setup.py”文件中的gnuwin32目录(替换第154行的“C:\Utils\GnuWin32”)。
然后您可以毫无问题地构建 ssl
模块。我自己测试了它,使用 GCC "4.3.2-tdm-2 mingw32"和命令行 setup.py build -cmingw32
(-cmingw32
像我一样强制 MinGW安装了微软的编译器)。构建成功后执行setup.py install
安装ssl
。
关于python - 如何在 Windows 上安装 Python ssl 模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2261866/