Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

Installing pycrypto on windows (popular solution not working)

Writer Andrew Mclaughlin

This is a traight up copy of my question from here.

I got a comment recommending posting it here as well since it is more of an environment thing.

I need to install pycrypto for a project that requires pycrypto. PyCryptodome is not an option, sadly.

I have tried what everybody seems to recommend, aka powershell commands proposed here but to no avail.

I set VCINSTALLDIR in my user vars to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\. I double checked that stdint.h is indeed at VCINSTALLDOR\Tool\MSVC\14.14.26428\include\. I then ran

set CL=-FI"%VCINSTALLDOR%Tool\MSVC\14.14.26428\include\stdint.h"

and

pip install pycrypto

still no luck. Tried it both with and without admin privileges.

Am I missing something?

6

1 Answer

Edit: It's easier to use pycryptodome, that has the same name when you use it. From here

pip uninstall crypto
pip uninstall pycrypto
pip install pycryptodome

For the installation of vstools (Microsoft Visual C++ 14.0) I used this answer

Now be sure that you had located acuratelly the next 2 paths (Mine below):

vcvars*.bat (choose file name depending on VC version and architecture): C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build

stdint.h: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include

In a command shell

  1. Go to the vsvars*.bat location

    cd C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build

  2. Run vsvars*.bat depending on VC version and architecture

    vcvars64.bat

  3. Set the stdint.h location, without close the shell

    set CL=-FI"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include\stdint.h"

  4. Install pycrypto again

    pip install pycrypto

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy