不能easy_install ssl模块

时间:2011-07-25 13:34:50

标签: python ssl easy-install

执行easy_install ssl时出现以下错误:

C:\Windows\system32>easy_install ssl
Searching for ssl
Reading http://pypi.python.org/simple/ssl/
Reading http://docs.python.org/dev/library/ssl.html
Best match: ssl 1.15
Downloading http://pypi.python.org/packages/source/s/ssl/ssl-1.15.tar.gz#md5=81ea8a1175e437b4c769ae65b3290e0c
Processing ssl-1.15.tar.gz
Running ssl-1.15\setup.py -q bdist_egg --dist-dir c:\users\fipethor\appdata\local\temp\easy_install-v2d68a\ssl-1.15\egg-dist-tmp-klfhbm

error: Setup script exited with error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installed,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.

1 个答案:

答案 0 :(得分:4)

  1. 访问:http://sourceforge.net/project/showfiles.php?group_id=2435

  2. 下载&运行:自动MinGW安装程序(确保检查基础,g ++和Make)

  3. 更新您的路径:将C:\ mingw \ bin目录添加到系统路径

  4. 创建(或编辑):C:\ Python25 \ Lib \ distutils \ distutils.cfg并添加以下两行:

    [构建]

    编译器的mingw32 =

  5. 在此处找到:

    http://old.nabble.com/Installing-PyXML-problems-td12405796.html