General Discussions

Handling the vcvarsall.bat error

We might end up with the “unable to find vcvarsall.bat” error while installing the python packages on windows system.

Why it happens?
When we try to install the python package, it has to compile that c/c++ file from source(python is not just a .py) for which there is a need of compiler(a supported version of Visual Studio, basically). PIP will assume that the compiler is present and end up with the error message.

One way is to install/update the compiler and then resume the python installations. There are various methods available on web from setting the path in environment variables to installing the right version of Visual Studio etc.

The fastest way actually is to install using python wheel. Steps to follow:

  • Check if the .whl file for your required package is available – Python Wheels. If not yet, one will have to look out for other means as stated above. Feel free to explore more about wheel. Web has a lot of supporting contents.
  • Install wheel using pip (or any other mechanism you generally follow)
  • Download the .whl file of the package you want and install it using wheel. Make sure that you have downloaded the right version of .whl supporting the python version you use and OS you have.


One thought on “Handling the vcvarsall.bat error

Let me Know What you Think!

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s