Python Pip install Error: Unable to find vcvarsall.bat. Tried all solutions

This question already has an answer here:

  • error: Unable to find vcvarsall.bat 40 answers

  • I have tried all suggestions and found my own simple solution.

    The problem is that codes written in external environment like C need compiler. Look for its own VS environment, ie VS 2008.

    Currently my machine runs VS 2012 and faces Unable to find vcvarsall.bat . I studied codes that i want to install to find the VS version. It was VS 2008. i have add to system variable VS90COMNTOOLS as variable name and gave the value of VS120COMNTOOLS .

    You can find my step by step solution below:

  • Right click on My Computer.
  • Click Properties
  • Advanced system settings
  • Environment variables
  • Add New system variable
  • Enter VS90COMNTOOLS to the variable name
  • Enter the value of current version to the new variable.
  • Close all windows
  • Now open a new session and pip install your-package


    After doing a lot of things, I upgraded pip , setuptools and virtualenv .

  • python -m pip install -U pip
  • pip install -U setuptools
  • pip install -U virtualenv
  • I did steps 1, 2 in my virtual environment as well as globally. Next, I installed the package through pip and it worked.


    Try installing this, it's a known workaround for enabling the C++ compiler for Python 2.7.

    In my experience, when pip does not find vcvarsall.bat compiler, all I do is opening a Visual Studio console as it set the path variables to call vcvarsall.bat directly and then I run pip on this command line.

    链接地址: http://www.djcxy.com/p/26314.html

    上一篇: 错误:无法在python 3.5上找到vcvarsall.bat

    下一篇: Python Pip安装错误:无法找到vcvarsall.bat。 试过所有的解决方案