1

Whilst there's less of an issue with Python 2.7, Python 3.4 relies on the pycrypto library for numerous wrappers/APIs/tools such as BlockTrail, pycoin, pybitcointools, etc etc.

The error I'm getting:

building 'Crypto.Random.OSRNG.winrandom' extension

warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.

error: Unable to find vcvarsall.bat

It's an issue with the gcc C++ compiler for Windows, I understand, however the binaries offered in that solution, sadly, don't cover Python 3.4 (version for 3.3 won't cut it, unfortunately).

A solution - other than installing pseudo-Posix (ie Ming32) - would be very useful for those transitioning to Python 3.xenter preformatted text here

2 Answers 2

1

This worked for me. Download the package from here. I personally tested this for Python 3.4 and Windows 64 bit. https://www.dropbox.com/s/n6rckn0k6u4nqke/pycrypto-2.6.1.zip?dl=0

  • Select your architecture and install the exe file.

  • This will create a Lib folder in your python directory. My python was installed in C:\python3.4. This software created a directory in C:\ .The directory was named "Lib".

  • Inside lib there is "site-packages". Copy everything under site-packages (only two folders - Crypto and *.egg-info) and then paste where your python's site-package is. E.g. I am using virtualenv and my path was C:\Users\RChaudhary\Programs\PythonVirtualEnvironment\bookeeping.frontend\Lib\site-packages

  • I pasted my files here and voila, it works. pip3.4 list showed my the package and my program also runs correctly.
  • From your program manager, uninstall what you installed earlier. Your pycrypto will still work.
3
  • ` From your program manager, uninstall...` that's good to know! May 19, 2015 at 5:06
  • Lol! Sorry about that. I have a habit of cleaning. So I cannot stand having unwanted files on my system.
    – Rash
    May 19, 2015 at 14:07
  • I was being serious FWIW May 19, 2015 at 23:06
2

Binaries available for Python 3.4:

As outlined here on SE, binaries available for Python 2.x - 3.3:

This solves the dependencies issues error compile failed with error code 1 using pip. Also, the following error screen (at the CLI) should not be appearing any more following installation, via pip or setup install, of pycrypto dependent libraries!

Skipping implicit fixer: ws_comma
running build_ext
building 'Crypto.Random.OSRNG.winrandom' extension
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
error: Unable to find vcvarsall.bat

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.