From when does matplotlib require Visual C++? (Python 3.8.0)

  • Context: C/C++ 
  • Thread starter Thread starter Wrichik Basu
  • Start date Start date
  • Tags Tags
    Matplotlib Visual
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 3K views
Messages
2,188
Reaction score
2,694
I had Python 3.7.3 installed on my laptop. I decided to upgrade to 3.8.0, and after installing all necessary packages, uninstall the old version.

The installation of 3.8.0 was successfully done. With pip, I installed scipy, numpy and sympy. Now when I tried to install matplotlib, it threw an error. It was a large message, so I have attached that as a text file.

This line in the error message caught my eye:
Code:
Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
I don't have Visual C++ installed, simply because I don't use it and won't require it anytime in the near future. The installation is about 1GB, and I am reluctant to install another piece of software just for Python. I already have Matlab student version (which I bought recently), and use that for all my computation work. I have Python only because it is there in my syllabus. And I have somewhat decided to stick to the old version.

The fact is, I have matplotlib installed for the old version of python. It works fine. And I didn't have Visual C++ at that time. Why is Visual C++ required now all of a sudden? Is this a bug or a deliberate feature?
 

Attachments

Last edited:
Physics news on Phys.org
Wrichik Basu said:
Why is Visual C++ required now all of a sudden?

I believe it's because Python on Windows needs the build tools supplied with Visual C++ to build certain packages. AFAIK that has been true for many Python releases. It's possible that matplotlib changed how they do Python deployments so that now the build tools are required on Windows where they weren't before; or it's possible that the recent changes in how Python distributions are packaged have impacted matplotlib so that they can't, or haven't yet, build a Windows binary distribution for the version you're installing.
 
  • Like
Likes   Reactions: Wrichik Basu
  • Like
Likes   Reactions: Dr Transport