问题
I'm trying to install PyCrypto 2.4.1 on my local machine (Windows 7 64bit). But, I got following messages on 'python setup.py install'.
running install
running build
running build_py
running build_ext
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building 'Crypto.Random.OSRNG.winrandom' extension
error: Unable to find vcvarsall.bat
What I want to ask is this: can I just copy lib
folder which contains Crypto
folder in it to where my app is located? I'm developing a Google AppEngine app using Python27 runtime, and, I just need local library for PyCrypto.
回答1:
Actually, I just needed some compiled version of PyCrypto for Windows 64bit.
- PyCrypto version: 2.3.1
- Python version: 2.7.1
- Target platform: Windows 64bit
And, I could get one from here. And, this is a direct download link.
Thanks, everyone!
回答2:
Did a bit of research for you, and here's the bug that was filed for the SDK: http://code.google.com/p/googleappengine/issues/detail?id=2493
Summary of the issue: GAE has a customized version of PyCrypto 2.0.1 installed. Docs can be found here.
SDK does not include the PyCrypto implementation from GAE, so it needs to be installed locally. However, the default path for installation is blocked by the SDK. Solution recommended in the bug comments is to install PyCrypto in each app's directory. Steps are outlined in the bug comments (not trivial).
Hope this helps!
EDIT: This one could be helpful as well: http://code.google.com/p/googleappengine/issues/detail?id=1627
回答3:
You don't need to do any of this, just install from the PyCrypto binaries
回答4:
Alternatively, simply download and install ActivePython-2.7.2.5-win64-x64.msi (or ActivePython-2.7.2.5-win32-x86.msi for Win32) then run pypm install pycrypto
来源:https://stackoverflow.com/questions/8647828/pycrypto-install-by-copying-lib-folder-on-windows7-64bit