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

后端 未结 2 1872
余生分开走
余生分开走 2021-01-01 06:21

I tried to install ephem module on my Windows 8.1 using

pip install ephem

but I get this error:

Microsoft Visual C++ 10.0 is

相关标签:
2条回答
  • 2021-01-01 06:43

    I had the same problem and found the best solution here: http://www.devdungeon.com/content/fix-pip-install-unable-find-vcvarsallbat

    It says:

    Visual Studio 11, 12, and 14 are installed, but not 10. The error above specified it needed version 10. A newer version should work just as well, so let's just tell the environment to use the latest compiler instead of looking for version 10. In this case, 14 is the newest version. If you look at the pattern of the variable names, you can determine that the name for the version 10 should be VS100COMNTOOLS. You can set the version 10 variable to the value of version 14 with the following command: set VS100COMNTOOLS=%VS140COMNTOOLS%

    So, go to the command window and run the following command:

    set "VS100COMNTOOLS=%VS140COMNTOOLS%"
    

    I hope it helps other users.

    0 讨论(0)
  • 2021-01-01 07:01

    I just did the following steps and was able to install the extension via pip. I'm working on Windows 8.1 x64.

    1. Install latest Python 3 version using the x86 installer. (x64 is more difficult because VS doesn't include a compiler for x64, see second answer here)

    2. Install Visual C++ Studio 2010 Express which can be downloaded from Microsoft (follow this link, the visual studio 2010 downloads are at the bottom of the page. You need to download the C++ release and i think you have to register at Microsoft to be able to download the software).

    3. Run py -3 -m pip install ephem to istall ephem. (py -3 -m pip calls pip from your python 3 installation, helpful if you also have python 2 installed)

    Worked for me without any problems.

    Update 2017:

    See the following link that contains information on compiling python on windows:

    https://wiki.python.org/moin/WindowsCompilers

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