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

  • Thread starter Thread starter Wrichik Basu
  • Start date Start date
  • Tags Tags
    Matplotlib Visual
Click For Summary
The discussion centers on the challenges faced after upgrading from Python 3.7.3 to 3.8.0, particularly regarding the installation of matplotlib, which requires Microsoft Visual C++ 14.0. The user expresses reluctance to install Visual C++ due to its size and the fact that they do not typically use it, especially since they already have Matlab for computational tasks. The requirement for Visual C++ is attributed to changes in how certain Python packages, like matplotlib, are deployed on Windows, necessitating the build tools for installation. There is a suggestion to consider using Anaconda, which may not have the same dependency on Visual C++, although it is noted that Anaconda now includes Microsoft Visual Studio tools. The conversation highlights the evolving dependencies in Python package installations and the potential impact on users who prefer minimal setups.
Wrichik Basu
Science Advisor
Insights Author
Gold Member
Messages
2,180
Reaction score
2,721
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:
Technology 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 Wrichik Basu
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 15 ·
Replies
15
Views
8K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
9
Views
4K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K