Python Pip install Error: Unable to find vcvarsall.bat. Tried all solutions
I tried to install Scrapy for Python 2.7.8 (anaconda 2.1.0) 32-bit using
pip install scrapy
And I got this error
error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).
I have followed the solutions found in these stackover flow questions. Nothing worked.
This is the error, and a few lines above and below it:
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win32-3.4\lxml\isoschematron\resources\xsl\iso-schematron-xslt1 running build_ext building 'lxml.etree' extension C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution opt ion: 'bugtrack_url' warnings.warn(msg) error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat). ---------------------------------------- Command "C:\Python34\python.exe -c "import setuptools, tokenize;__file__='C: \\Users\\San\\AppData\\Local\\Temp\\pip-build-wp6ei6r9\\lxml\\setup.py';exec(com pile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __f ile__, 'exec'))" install --record C:\Users\San\AppData\Local\Temp\pip-kfkzr_67-r ecord\install-record.txt --single-version-externally-managed --compile" failed w ith error code 1 in C:\Users\San\AppData\Local\Temp\pip-build-wp6ei6r9\lxml
I have both Microsoft Visual Studio 12.0, and Microsoft visual C++ compiler package for Python 2.7, both of which have the vcvarsall.bat file.
I have a system variable that is called 'VS120COMNTOOLS' and is its path is set to
C:\Program Files\Microsoft Visual Studio 12.0\Common7\Tools\
I also added both paths to my environment variables. I've also tried just adding one, and then the other. My Path looks like this
C:\Program Files\Java\jdk1.7.0_25\bin;\Python27;\Python2\python.exe;C:\Python27\Scripts\;C:\Users\San\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\;C:\Program Files\Microsoft Visual Studio 12.0\VC\;
I also updated by my setup tools (I think to version 8), which should autodetect Microsoft Visual C++ Compiler for Python 2.7. However, I'm still getting the same error.
I have also tried using
And I get this error
error: Setup script exited with error: Microsoft Visual C++ 10.0 is required (Un
able to find vcvarsall.bat).
I also have the following in my registry
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, i.e. 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
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