WebPro Education

Tech tips everyday
Menu
  • REVIEWS
  • VIDEOS
Home
VIDEOS
How To Install Matplotlib In Windows
VIDEOS

How To Install Matplotlib In Windows

Erick Wachira May 12, 2025

Matplotlib is one of the most popular Python libraries for creating static, animated, and interactive visualizations. Whether you want to make simple line plots or complex heatmaps, Matplotlib provides the tools you need.

In this article, we’ll walk through everything you need to know to install Matplotlib in Windows. Get Matplotlib up and running on your system.

Before installing Matplotlib, make sure you have Python installed (version 3.7 or higher recommended). A command-line interface is also required, in this case, Command Prompt on Windows. Internet connection will also be mandatory to download packages.

Read: How To Install Jupyter Notebook

Install Matplotlib In Windows

You can use pip, Anaconda, or Jupyter Notebooks to install matplotlib. pip is the standard package manager for Python that can be use to download, update and manage the standard package libraries. Follow these steps to install matplotlib using pip:

First, ensure you have the latest version of Python installed on your computer. If you haven’t, here’s how.

The next thing to do, verify whether you have the matplotlib module to do this, type IDLE in the search bar of your computer an hit the Enter key. Integrated Development and Learning Environment (IDLE) enables you to run your Python programs.

IDLE In Windows

Inside IDLE, type import matplotlib then press Enter. If an error is returned, then it means that matplotlib is not installed. Close IDLE if this is the case to proceed to the next step.

Confirm Matplotlib is Installed

It’s also a good idea to have the latest pip. To verify the version of Python you’re running, type cmd in your computer’s search bar and press enter or select Run as Administrator.

CMD In Windows

Here, enter the command, python –version and hit enter. As at May 2025, the latest version should return Python 3.13.3.

How To Check Python Version

In the next command line, type pip install matplotlib and press Enter.

How To Install Matplotlib In Windows

Give the package a few moments to install. You should receive a message that matplotlib has been successfully installed.

Install Matplotlib In Windows

Launch IDLE once more and type import matplotlib then press Enter. If the line plot shows up without errors, you’re good to go. It means that your Matplotlib is installed properly and working correctly.

Import Matplotlib

Troubleshooting Common Errors

ModuleNotFoundError: No module named ‘matplotlib’ – Make sure you installed it in the same environment/interpreter you’re running. Check for multiple Python installations – which python vs. which pip.

Backend-related errors (e.g., “_tkinter not found”): Matplotlib uses different “backends” to display graphs. If you get errors about missing GUI toolkits:

On Linux: install system packages like python3-tk (for TkAgg) or python3-qt5 or switch to a non-interactive backend by adding at the top of your script:

python
Copy
Edit
import matplotlib
matplotlib.use(‘Agg’)

This writes files (e.g., PNG) instead of opening windows.

Permission errors on install: Avoid using sudo pip install. Instead, use a virtual environment or Conda environment.

Slow imports or large dependencies: If you only need basic plotting, consider installing the minimal version of Matplotlib:

bash
Copy
Edit
pip install matplotlib-base

You can also use lightweight plotting libraries like Plotext for terminal plots.

Watch: Install Jupyter Notebook

Share
Linkedin
Whatsapp
Tweet
Reddit
Stumble
Tumblr
Email
Prev Article
Next Article

Related Articles

How To Enable Text Message Notifications On The Lock Screen Of Samsung Galaxy A06

How To Enable Text Message Notifications On The Lock Screen Of Samsung Galaxy A06

How To Turn WiFi ON & OFF On Samsung Galaxy S25 & S25 Ultra

How To Turn WiFi ON & OFF On Samsung Galaxy S25 & S25 Ultra

About The Author

Erick Wachira

Based in Nairobi, Kenya, I am a tech enthusiast who travels down the forgotten road of tutorials regarding everyday tech. We all use our smartphones, TVs, Bluetooth devices, PCs and many more tech devices in our day-to-day. With that, comes issues from time-to-time that need a solution you may not have though of, or might have overlooked. This is where I come in. To the rescue as I offer you solutions and troubleshooting steps to everyday tech problems.

  • Facebook
  • Twitter
  • YouTube
  • Instagram
  • Reddit
  • Link
  • TikTok
  • How To Make Google Docs Document Available OFFLINE
  • How To Apply Custom Line Spacing In Google Docs
  • How To Enable / Disable Friend Request Notifications On Nintendo Switch 2
  • How To Double space In Google Docs
  • How To Enable / Disable GameChat Invitation Notifications On Nintendo Switch 2

Recent Posts

WebPro Education

Tech tips everyday
Copyright © 2025 WebPro Education

Ad Blocker Detected

Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Refresh