Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)

后端 未结 30 2203
谎友^
谎友^ 2020-11-21 07:34

I\'ve installed Python 3.5 and while running

pip install mysql-python

it gives me the following error

error: Microsoft Vi         


        
30条回答
  •  礼貌的吻别
    2020-11-21 08:08

    I had this exact issue while trying to install mayavi.

    So I also had the common error: Microsoft Visual C++ 14.0 is required when pip installing a library.

    After looking across many web pages and the solutions to this thread, with none of them working. I figured these steps (most taken from previous solutions) allowed this to work.

    1. Go to Build Tools for Visual Studio 2017 and install Build Tools for Visual Studio 2017. Which is under All downloads (scroll down) >> Tools for Visual Studio 2017
      • If you have already installed this skip to 2.

    1. Select the C++ Components you require (I didn't know which I required so installed many of them).
      • If you have already installed Build Tools for Visual Studio 2017 then open the application Visual Studio Installer then go to Visual Studio Build Tools 2017 >> Modify >> Individual Components and selected the required components.
      • From other answers important components appear to be: C++/CLI support, VC++ 2017 version <...> latest, Visual C++ 2017 Redistributable Update, Visual C++ tools for CMake, Windows 10 SDK <...> for Desktop C++, Visual C++ Build Tools core features, Visual Studio C++ core features.

    1. Install/Modify these components for Visual Studio Build Tools 2017.

    2. This is the important step. Open the application Visual Studio Installer then go to Visual Studio Build Tools >> Launch. Which will open a CMD window at the correct location for Microsoft Visual Studio\YYYY\BuildTools.

    1. Now enter python -m pip install --upgrade setuptools within this CMD window.

    1. Finally, in this same CMD window pip install your python library: pip install -U .

提交回复
热议问题