Home > Backend Development > Python Tutorial > Why Can't I Find vcvarsall.bat When Installing Python Packages?

Why Can't I Find vcvarsall.bat When Installing Python Packages?

DDD
Release: 2024-12-19 19:17:13
Original
136 people have browsed it

Why Can't I Find vcvarsall.bat When Installing Python Packages?

Unable to Find vcvarsall.bat: Resolving the Issue

When installing Python packages like dulwich, you may encounter the error message "error: Unable to find vcvarsall.bat." This cryptic error indicates that the required version of Visual C is not installed.

Solution:

For Windows Installations:

Python 2.7 searches for Visual Studio 2008 during package installation. If you have a newer version installed, you can trick Python by setting the correct path in the VS90COMNTOOLS environment variable before calling setup.py.

Execute the following command based on the installed Visual Studio version:

  • Visual Studio 2010: SET VS90COMNTOOLS=%VS100COMNTOOLS%
  • Visual Studio 2012: SET VS90COMNTOOLS=%VS110COMNTOOLS%
  • Visual Studio 2013: SET VS90COMNTOOLS=%VS120COMNTOOLS%
  • Visual Studio 2015: SET VS90COMNTOOLS=%VS140COMNTOOLS%

Note: This method may not work for compiling Python modules. Refer to "Building lxml for Python 2.7 on Windows" for more information.

The above is the detailed content of Why Can't I Find vcvarsall.bat When Installing Python Packages?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template