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

后端 未结 30 2179
谎友^
谎友^ 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:12

    After reading a lot of answers in SO and none of them working, I finally managed to solve it following the steps in this thread, I will leave here the steps in case the page dissapears:

    Please try to install Build Tools for Visual Studio 2017, select the workload “Visual C++ build tools” and check the options "C++/CLI support" and "VC++ 2015.3 v14.00 (v140) toolset for desktop" as below.

    Hope it helps as it did for me.

    0 讨论(0)
  • 2020-11-21 08:12

    Make sure that you've installed these required packages.Worked perfectly in my case as i installed the checked packages

    0 讨论(0)
  • 2020-11-21 08:13

    I had the same problem when installing spaCy module. And I checked control panel I have several visual C++ redistributables installed already.

    What I did was select "Microsoft Visual Studio Community 2015" which is already installed on my PC --> "Modify" -->check "Common Tools for Visual C++ 2015". Then it will take some time and download more than 1 GB to install it.

    This fixed my issue. Now I have spaCy installed.

    0 讨论(0)
  • 2020-11-21 08:13

    Just had the same issue while using the latest Python 3.6. With Windows OS 10 Home Edition and 64 Bit Operation System

    Steps to solve this issue :

    1. Uninstall any versions of Visual studio you have had, through Control Panel
    2. Install Visual Studio 2015 and chose the default option that will install Visual C++ 14.0 on its own
    3. You can use Pycharm for installing scrapy ->Project->Project Interpreter->+ (install scrapy)
    4. check scrapy in REPL and pycharm by import , you should not see any errors
    0 讨论(0)
  • 2020-11-21 08:15

    TLDR run vcvars64.bat

    After endlessly searching through similar questions with none of the solutions working. -Adding endless folders to my path and removing them. uninstalling and reinstalling visual studio commmunity and build tools. and step by step attempting to debug I finally found a solution that worked for me.

    (background notes if anyone is in a similar situation) I recently reset my main computer and after reinstalling the newest version of python (Python3.9) libraries I used to install with no troubles (main example pip install opencv-python) gave

    cl
        is not a full path and was not found in the PATH.
    

    after adding cl to the path from C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64

    and several different windows kits one at a time getting the following.

    The C compiler
    
    "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe"
    
    is not able to compile a simple test program.
    

    with various link errors or " Run Build Command(s):jom /nologo cmTC_7c75e\fast && The system cannot find the file specified"

    upgrading setuptools and wheel from both a regular command line and an admin one did nothing as well as trying to manually download a wheel or trying to install with --only-binary :all:

    Finally the end result that worked for me was running the correct vcvars.bat for my python installation namely running "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" once (not vcvarsall or vcvars32) (because my python installed was 64 bit) and then running the regular command pip install opencv-python worked.

    0 讨论(0)
  • 2020-11-21 08:16

    I had the same problem. I needed a 64-bit version of Python so I installed 3.5.0 (the most recent as of writing this). After switching to 3.4.3 all of my module installations worked.

    Python Releases for Windows

    0 讨论(0)
提交回复
热议问题