Python – Unable to Install pycrypto

installationmingw32pycryptopythonwindows 7

ValueError: invalid version number '2.20.51.20100613'

I'm having problems installing pycrypto. Tried package manager: pip & easy_install, didn't work. Tried to manually install it via "python setup.py install", the same error like the above appears.

I've followed the instructions here and got stuck at installing pycrypto after installing "mingW" gcc, g++ and msys-base (MSYS shell environment)

Not really sure what to do now after several days of trying.

Here's the complete output of the error:

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'

Best Answer

You can get working windows binaries on this page.

Related Topic