3

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 required (Unable to find vcvarsall.bat).

I'm using Python 3.4.3 Please tell me exactly what I should do to make this work. I went through many solutions but it didn't help me.

These are a few:

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

Python Pip install Error: Unable to find vcvarsall.bat. Tried all solutions

Community
  • 1
  • 1
  • Have you tried downloading the executable from the ephem package website? Windows is notorious for these problems and it is a real head ache to move packages around using pip on windows sometimes and so I gave up and us e anaconda as a package manager, but usually executables work well on windows so try that. – jfish003 Jul 01 '15 at 13:04
  • Could you give a link to that? –  Jul 01 '15 at 13:23

2 Answers2

4

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.

Gahan
  • 4,075
  • 4
  • 24
  • 44
aysegul
  • 61
  • 5
3

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

Felix
  • 6,131
  • 4
  • 24
  • 44
  • How do you specifically download 2010 Express, as only the upgraded 2013 are there on the Microsoft site? –  Jul 03 '15 at 05:32
  • As I said in my previous post, you have to look at the bottom of the page. There's a section called "Additional Information" and in this section is a heading called Visual Studio 2010 Express. You will find the right download (Visual C++ 2010 Express) under this heading. – Felix Jul 03 '15 at 09:23
  • Yep!! Successfully installed! Thanks a lot! –  Jul 03 '15 at 10:30
  • 5
    Do I really need to install VS 2010 even if I have VS 13 ? – Stupid_Intern Dec 05 '15 at 16:59