0

I am trying to install the Python module simplecrypto on a Windows machine. To do this I run the following:

C:\Python36\Scripts>pip install simplecrypto

However, upon running this partway through the installation process I receive the following error:

...
Crypto.PublicKey._fastmath.
    building 'Crypto.Random.OSRNG.winrandom' extension
    error: [WinError 3] The system cannot find the path specified: 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib'

    ----------------------------------------
Command "c:\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\EDM-P\\AppData\\Local\\Temp\\pip-build-teqxfnwt\\PyCrypto\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\EDM-P\AppData\Local\Temp\pip-nrmsip8r-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\EDM-P\AppData\Local\Temp\pip-build-teqxfnwt\PyCrypto\

Why is this the case?

jdoe
  • 634
  • 5
  • 19
EDM
  • 195
  • 6

1 Answers1

0

An error occurs when it attempts to install PyCrypto, which is a requirement of the package. The GitHub README mentions:

If the dependency installation fail on Windows, you may want to use a prebuilt installer. If you wish to compile it I suggest using the Mingw tools as indicated here.

Install it from here and then compile by

install MinGW with C++ Compiler option checked add C:\MinGW\bin to your PATH in PYTHONPATH\Lib\distutils, create a file distutils.cfg and add these lines:

[build] compiler=mingw32

jdoe
  • 634
  • 5
  • 19