由于AppEngine要求通过SSL上传您的应用程序,因此我尝试在我的工作笔记本电脑上安装该模块。
我的系统是x64 Win 7,已安装Python 2.5.4 x86。
我按照这篇文章的指南进行了操作:如何在Windows上安装Python ssl模块? 并查看了所有相关链接。
但主要问题是,MinGw和GnuWin似乎都无法正常工作。
GnuWin已完美安装,已更新并具有构建SSL模块所需的所有依赖项。
但在输入命令
> "C:\Python25\python.py" setup.py install -c mingw32
这个命令明显失败了。 "-cmingw32"和"-gnuwin32"也是一样。 (-cmingw32显然失败了,因为尽管MinGW已经完全安装好了,但MinGW没有被识别)
使用"build"而不是"install"似乎会"输出"一些内容: MinGw抱怨"ggc no such file or directory",而在GnuWin中,"it doesn't know how to compile C/C++ on a nt with gnuwin"
对我来说听起来完全是胡言乱语,因为我按照教程中的说明做了一切。
我解决了问题的一部分:现在easy_install可以识别gcc了,但AE仍然抱怨缺少SSL模块,尽管easy_install和python都说Pycrypto incl. SSL已经成功安装
easy_install ssl
C:\Users\faits>easy_install ssl
Searching for ssl
Best match: ssl 1.15
Adding ssl 1.15 to easy-install.pth file
Using c:\python25\lib\site-packages
Processing dependencies for ssl
Finished processing dependencies for ssl
easy_install pycrypto
C:\Users\faits>easy_install ssl
Searching for ssl
Best match: ssl 1.15
Adding ssl 1.15 to easy-install.pth file
Using c:\python25\lib\site-packages
Processing dependencies for ssl
Finished processing dependencies for ssl
python
IDLE 1.2.4
>>> import ssl
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import ssl
File "C:\Python25\lib\site-packages\ssl\__init__.py", line 61, in <module>
import _ssl2 # if we can't import it, let the error propagate
ImportError: No module named _ssl2
python
>>> import pycrypto
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
import pycrypto
ImportError: No module named pycrypto
gcc
而不是ggc
。 - jfseasy_install
获得的命令和精确错误信息粘贴在下方。 - jfs