无法安装pycrypto

时间:2011-02-07 11:51:17

标签: python windows-7 install mingw32 pycrypto

ValueError: invalid version number '2.20.51.20100613'

我在安装pycrypto时遇到问题。尝试过包裹经理:pip& easy_install,没用。试图通过“python setup.py install”手动安装它,出现与上面相同的错误。

我按照here的说明操作,在安装“mingW”gcc,g ++和msys-base(MSYS shell环境)之后卡在安装pycrypto

经过几天的尝试后,我真的不确定该怎么办。

以下是错误的完整输出:

C:\Users\Denz\Desktop>pip install pycrypto
Downloading/unpacking pycrypto
  Running setup.py egg_info for package pycrypto
Installing collected packages: pycrypto
  Running setup.py install for pycrypto
    Traceback (most recent call last):
      File "", line 1, in ?
      File "C:\Users\Denz\Desktop\build\pycrypto\setup.py", line 340, in ?
        core.setup(**kw)
      File "C:\Python24\lib\distutils\core.py", line 149, in setup
        dist.run_commands()
      File "C:\Python24\lib\distutils\dist.py", line 946, in run_commands
        self.run_command(cmd)
      File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
        cmd_obj.run()
      File "c:\python24\lib\site-packages\distribute-0.6.14-py2.4.egg\setuptools
\command\install.py", line 53, in run
        return _install.run(self)
      File "C:\Python24\lib\distutils\command\install.py", line 506, in run
        self.run_command('build')
      File "C:\Python24\lib\distutils\cmd.py", line 333, in run_command
        self.distribution.run_command(command)
      File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
        cmd_obj.run()
      File "C:\Python24\lib\distutils\command\build.py", line 112, in run
        self.run_command(cmd_name)
      File "C:\Python24\lib\distutils\cmd.py", line 333, in run_command
        self.distribution.run_command(command)
      File "C:\Python24\lib\distutils\dist.py", line 966, in run_command
        cmd_obj.run()
      File "C:\Python24\lib\distutils\command\build_ext.py", line 253, in run
        force=self.force)
      File "C:\Python24\lib\distutils\ccompiler.py", line 1177, in new_compiler
        return klass (None, dry_run, force)
      File "C:\Python24\lib\distutils\cygwinccompiler.py", line 292, in init

CygwinCCompiler.__init__ (self, verbose, dry_run, force) File "C:\Python24\lib\distutils\cygwinccompiler.py", line 83, in __init__ self.gcc_version, self.ld_version, self.dllwrap_version = \ File "C:\Python24\lib\distutils\cygwinccompiler.py", line 424, in get_versions ld_version = StrictVersion(result.group(1)) File "C:\Python24\lib\distutils\version.py", line 40, in __init__ self.parse(vstring) File "C:\Python24\lib\distutils\version.py", line 107, in parse raise ValueError, "invalid version number '%s'" % vstring ValueError: invalid version number '2.20.51.20100613'

1 个答案:

答案 0 :(得分:2)

您可以在this page上获得正常工作的Windows二进制文件。