{"id":227,"hash":"9fc28fd535e2671ef8d429be216b75d12a920df5ed1bb8ffd4664a291e91c46e","pattern":"error: Unable to find vcvarsall.bat","full_message":"I tried to install the Python package dulwich:\n\npip install dulwich\n\nBut I get a cryptic error message:\n\nerror: Unable to find vcvarsall.bat\n\nThe same happens if I try installing the package manually:\n\n> python setup.py install\nrunning build_ext\nbuilding 'dulwich._objects' extension\nerror: Unable to find vcvarsall.bat","ecosystem":"pypi","package_name":"windows","package_version":null,"solution":"Update: Comments point out that the instructions here may be dangerous. Consider using the Visual C++ 2008 Express edition or the purpose-built Microsoft Visual C++ Compiler for Python (details) and NOT using the original answer below. Original error message means the required version of Visual C++ is not installed.\n\nFor Windows installations:\n\nWhile running setup.py for package installations, Python 2.7 searches for an installed Visual Studio 2008. You can trick Python to use a newer Visual Studio by setting the correct path in VS90COMNTOOLS environment variable before calling setup.py.\n\nExecute the following command based on the version of Visual Studio installed:\n\nVisual Studio 2010 (VS10): SET VS90COMNTOOLS=%VS100COMNTOOLS%\nVisual Studio 2012 (VS11): SET VS90COMNTOOLS=%VS110COMNTOOLS%\nVisual Studio 2013 (VS12): SET VS90COMNTOOLS=%VS120COMNTOOLS%\nVisual Studio 2015 (VS14): SET VS90COMNTOOLS=%VS140COMNTOOLS%\n\nWARNING: As noted below, this answer is unlikely to work if you are trying to compile python modules.\n\nSee Building lxml for Python 2.7 on Windows for details.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat","votes":878,"created_at":"2026-04-19T04:41:35.773520+00:00","updated_at":"2026-04-19T04:51:47.820721+00:00"}