python - error: Unable to find vcvarsall.bat -


i tried install python package dulwich:

pip install dulwich 

but cryptic error message:

error: unable find vcvarsall.bat 

the same happens if try installing package manually:

> python setup.py install running build_ext building 'dulwich._objects' extension error: unable find vcvarsall.bat 

update: comments point out instructions here may dangerous. consider using visual c++ 2008 express edition or purpose-built microsoft visual c++ compiler python (details) , not using original answer below. original error message means required version of visual c++ not installed.


for windows installations:

while running setup.py package installations, python 2.7 searches installed visual studio 2008. can trick python use newer visual studio setting correct path in vs90comntools environment variable before calling setup.py.

execute following command based on version of visual studio installed:

  • visual studio 2010 (vs10): set vs90comntools=%vs100comntools%
  • visual studio 2012 (vs11): set vs90comntools=%vs110comntools%
  • visual studio 2013 (vs12): set vs90comntools=%vs120comntools%
  • visual studio 2015 (vs14): set vs90comntools=%vs140comntools%

warning: noted below, answer unlikely work if trying compile python modules.

see building lxml python 2.7 on windows details.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -