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

后端 未结 30 2197
谎友^
谎友^ 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 07:51

    Your path only lists Visual Studio 11 and 12, it wants 14, which is Visual Studio 2015. If you install that, and remember to tick the box for Languages->C++ then it should work.

    On my Python 3.5 install, the error message was a little more useful, and included the URL to get it from

     error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
    

    Edit: New working link

    Edit: As suggested by Lightfire228, you may also need to upgrade setuptools package for the error to disappear:

    pip install --upgrade setuptools
    

提交回复
热议问题