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
Click For Summary
SUMMARY

Matplotlib installation on Python 3.8.0 requires Microsoft Visual C++ 14.0 due to changes in package deployment methods. Users upgrading from Python 3.7.3 may encounter installation errors if Visual C++ Build Tools are not present. This requirement is consistent with the need for build tools on Windows for certain Python packages. An alternative solution is to consider using Anaconda, which now includes Microsoft Visual Studio tools.

PREREQUISITES
  • Understanding of Python package management with pip
  • Familiarity with Microsoft Visual C++ Build Tools
  • Knowledge of Python distributions and their dependencies
  • Basic experience with Anaconda for Python package management
NEXT STEPS
  • Research the installation process for Microsoft Visual C++ Build Tools
  • Explore the differences between Python distributions, particularly Anaconda vs. standard Python
  • Learn how to troubleshoot common installation errors in Python packages
  • Investigate the implications of using different Python versions on package compatibility
USEFUL FOR

Python developers, data scientists, and anyone involved in scientific computing who needs to install and manage Python packages effectively.

Wrichik Basu
Science Advisor
Insights Author
Gold Member
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:
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   Reactions: Wrichik Basu
  • Like
Likes   Reactions: Dr Transport

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
4K
Replies
9
Views
4K
  • · Replies 13 ·
Replies
13
Views
5K
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K