Error "Microsoft Visual C++ 14.0 Is Required (Unable to Find Vcvarsall.Bat)"

Pip error: Microsoft Visual C++ 14.0 is required

You need to install Microsoft Visual C++ 14.0 to install pycrypto:

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual
C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

In the comments you ask which link to use. Use the link to Visual C++ 2015 Build Tools. That will install Visual C++ 14.0 without installing Visual Studio.

Alternate link: https://wiki.python.org/moin/WindowsCompilers#Microsoft_Visual_C.2B-.2B-_14.2_standalone:_Build_Tools_for_Visual_Studio_2019_.28x86.2C_x64.2C_ARM.2C_ARM64.29

In the comments you ask about methods of installing pycrypto that do not require installing a compiler. The binaries in the links appear to be for earlier versions of Python than you are using. One link is to a binary in a DropBox account.

I do not recommend downloading binary versions of cryptography libraries provided by third parties. The only way to guarantee that you are getting a version of pycrypto that is compatible with your version of Python and has not been built with any backdoors is to build it from the source.

After you have installed Visual C++, just re-run the original command:

pip install -U steem

To find out what the various install options mean, run this command:

pip help install

The help for the -U option says

-U, --upgrade        Upgrade all specified packages to the newest available
version. The handling of dependencies depends on the
upgrade-strategy used.

If you do not already have the steem library installed, you can run the command without the -U option.

How to solve error: Microsoft Visual C++ 14.0 or greater is required when installing Python packages?

Go to this link and download Microsoft C++ Build Tools:

https://visualstudio.microsoft.com/visual-cpp-build-tools/

Sample Image

Open the installer, then follow the steps.

You might have something like this, just download it or resume.

MSBT

If updating above doesn't work then you need to configure or make some updates here. You can make some updates here too by clicking "Modify".

Check that and download what you need there or you might find that you just need to update Microsoft Visual C++ as stated on the error, but I also suggest updating everything there because you might still need it on your future programs. I think those with the C++ as I've done that before and had a similar problem just like that when installing a python package for creating WorldCloud visualization.

C++ Build tools



UPDATE: December 28, 2020

You can also follow these steps here:

  1. Select: Workloads → Desktop development with C++
  2. Then for Individual Components, select only:
    • Windows 10 SDK
    • C++ x64/x86 build tools

You can also achieve the same automatically using the following command:

vs_buildtools.exe --norestart --passive --downloadThenInstall --includeRecommended --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.MSBuildTools

Reference:

https://www.scivision.dev/python-windows-visual-c-14-required

How do I install PyCrypto on Windows?

If you don't already have a C/C++ development environment installed that is compatible with the Visual Studio binaries distributed by Python.org, then you should stick to installing only pure Python packages or packages for which a Windows binary is available.

Fortunately, there are PyCrypto binaries available for Windows:
http://www.voidspace.org.uk/python/modules.shtml#pycrypto

UPDATE:

As @Udi suggests in the comment below, the following command also installs pycrypto and can be used in virtualenv as well:

easy_install http://www.voidspace.org.uk/python/pycrypto-2.6.1/pycrypto-2.6.1.win32-py2.7.exe

Notice to choose the relevant link for your setup from this list

If you're looking for builds for Python 3.5, see PyCrypto on python 3.5



Related Topics



Leave a reply



Submit