21

When I want to install packages, including Jupyter, I get the error that Microsoft Visual C++ 9.0 is required. I get the same error with Pip and pre-compiled binaries on UC website.

I have Visual Studio 17 express installed and I have manually added the path of vcvarsall to my environment.

I also saw solution to update the VS###COMMONTOOLS, however VS###COMMONTOOLS variable doesn't exist.

I am using Windows Server 2012.

How can I proceed?

wovano
  • 3,264
  • 4
  • 18
  • 43
user1871528
  • 1,501
  • 3
  • 22
  • 40
  • 1
    If this is a duplicate, why *shouldn't* it be marked as such? Duplicate of what - could you provide links? What do you mean *"doesn't exist"* (and what's with the extra characters)? – jonrsharpe Apr 26 '17 at 22:29
  • here is a couple link: https://stackoverflow.com/questions/43210299/error-microsoft-visual-c-9-0-is-required https://stackoverflow.com/questions/28251314/error-microsoft-visual-c-10-0-is-required-unable-to-find-vcvarsall-bat https://stackoverflow.com/questions/29846087/microsoft-visual-c-14-0-is-required-unable-to-find-vcvarsall-bat none of those really have a solution, they have suggestions and those suggestions are not working. – user1871528 Apr 26 '17 at 22:33
  • 1
    Then [edit] the question to say that - what have you tried, what did you expect to happen, and what happened instead? – jonrsharpe Apr 27 '17 at 21:59

4 Answers4

32

Download the archived version of Microsoft Visual C++ Compiler for Python 2.7 from the following link:

web.archive.org mirror: Microsoft Visual C++ Compiler for Python 2.7

Daniel Glynn
  • 513
  • 4
  • 8
15

Download and install Microsoft Visual C++ Compiler for Python 2.7 from the following link: Microsoft Visual C++ Compiler for Python 2.7

Morteza Zabihi
  • 2,634
  • 1
  • 17
  • 20
  • Nice, but i must be missing the runtime, i now get `fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory` – vesperto Feb 17 '22 at 17:20
-2

Leaving this here for the next time I run into this problem. For me, builds were failing via CI (Jenkins), but working for my user. Eventually I figured out that VCPython doesn't install system wide. I had to use runas to open a command prompt as the Local System user and then run the installer from that command prompt. Hopefully this helps someone else!

Jake Levitt
  • 120
  • 1
  • 9
-4

Answer in 2021:

As python 2.7 is deprecated and the Microsoft Visual C++ 9.0 package from https://www.microsoft.com/en-us/download/details.aspx?id=44266 (@Morteza Zabihi 's answer) officially doesn't support Windows 10 (might still work, didn't try). Here's what worked for me:

Simply download a current python version from Python website, e.g., Python 3.9.1. Then installing new packages should work w/o problems.

Zaphoid
  • 1,958
  • 1
  • 15
  • 18
  • 9
    I think this is a bad solution, in some cases the user is forced to use Python2.7, therefor using Python 3.9.1 is not a solution. @Daniel Glynn answer is Anno 2021 correct. Works on Windows 10 64-bit can confirm. I do agree with your answer more or less, If you still run on py2 please upgrade to py 3.9.x > when and if possible. – 0x78f1935 Jun 15 '21 at 14:13
  • 1
    @0x78f1935 Don't you think it's worth trying to get it (whatever you're doing) to run on a current version (which might work in a lot of cases) and only falling back to 2.7 if that doesn't work? – Zaphoid Jun 16 '21 at 09:47
  • 3
    No, it is not worth it because you may have a requirement from a customer or you have only Python 2 on the target platform. – Maxim Suslov Jun 18 '21 at 11:25
  • 1
    @Zaphoid, I agree however what Maxim Suslov said is unfortunately reality. Sometimes customers can't handle big changes. legacy code to py3.6+ for example. – 0x78f1935 Jun 21 '21 at 13:53
  • "We're sorry, this download is no longer available." – 0dminnimda Aug 01 '21 at 17:46
  • @0dminnimda You didn't even read the answer, right? You just clicked the first link!? But my case in point: If you don't want some "crooked" solution, try the current version! – Zaphoid Aug 06 '21 at 11:13
  • @Zaphoid when you support 2.7 for your package and want to add Windows tests, you just need to have Microsoft Visual C ++ 9.0! – 0dminnimda Aug 06 '21 at 15:49
  • 1
    @0dminnimda you can support 2.7 all you want but the world is moving on: https://www.python.org/doc/sunset-python-2/, Quote: "You should upgrade to Python 3 as soon as you can." as of January 1, 2020. – 0x78f1935 Sep 28 '21 at 06:24
  • FWIW - I am fine with this answer. "Why is this not working" answered by "because you are on old python" is good in some cases. For example I'm porting an old app and was on the fence about upgrading but will do so because of this. In many cases python 2.x is a requriement but not always, so this answer did solve the problem for me. – Adam Hughes Feb 11 '22 at 16:22