The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →For most Python setups, open a terminal or command prompt and run python -m pip install -U matplotlib. If your Python command is python3, use python3 -m pip install -U matplotlib instead. Then verify the install with the same interpreter you used to install it.
Install Matplotlib with pip
Matplotlib’s official installation guide lists wheel packages for Windows, macOS, and Linux, so a typical setup does not require compiling the library yourself. The package manager installs required dependencies automatically. Matplotlib installation guide
- Open Command Prompt, PowerShell, Terminal, or your project’s terminal.
- Run
python -m pip install -U matplotlib. The-Uoption asks pip to upgrade Matplotlib if it is already installed. - If your intended interpreter is invoked as
python3, runpython3 -m pip install -U matplotlibinstead.
Using python -m pip (or python3 -m pip) ties the pip command to that interpreter. This helps avoid installing Matplotlib into one Python environment and then trying to import it from another.
Choose the command for your operating system
Windows
Use the pip command above in Command Prompt or PowerShell. Run it with the same Python launcher or environment that will run your script. Matplotlib’s installation guide also lists Anaconda and WinPython as distributions that include Matplotlib. Matplotlib installation guide
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
macOS
Use python3 -m pip install -U matplotlib if python3 is the interpreter you plan to use. Matplotlib advises installing a fresh Python distribution rather than relying on Apple’s system Python, whose supplied packages can be difficult to upgrade. Python.org, Homebrew, and MacPorts are among the Python installation options covered in its guide. Matplotlib installation guide
Linux
You can use the pip command, or choose your distribution’s package manager if you want its packaged version. The official guide gives these examples:
Rank #2
- Debian or Ubuntu:
sudo apt-get install python3-matplotlib - Fedora:
sudo dnf install python3-matplotlib - Red Hat:
sudo yum install python3-matplotlib - Arch:
sudo pacman -S python-matplotlib
Distribution packages follow their own release cadence, so their Matplotlib version may differ from the version available through pip. Matplotlib installation guide
Use the package manager that matches your environment
If your project already uses an environment manager, install Matplotlib through it rather than mixing tools without a reason.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →| Environment | Command |
|---|---|
| pip | python -m pip install -U matplotlib |
| conda | conda install -c conda-forge matplotlib |
| uv | uv add matplotlib |
| pixi | pixi add matplotlib |
For conda, activate the environment first. These commands are listed in Matplotlib’s installation guide. Matplotlib installation guide
Verify that Matplotlib is installed in the Python you will use
Run this command with the same interpreter used for installation:
python -c "import matplotlib; print(matplotlib.__version__, matplotlib.__file__)"
Replace python with python3 if that is your command. A printed version confirms the import succeeded; the file path shows which Matplotlib installation Python found.
If the command reports ModuleNotFoundError or prints a version you did not expect, check which interpreter is active and install through that interpreter. On macOS and Linux, the Matplotlib guide documents which python3 as a diagnostic. Matplotlib installation guide
Best Value
If installation works but no plot window appears
Installing Matplotlib and opening an interactive window are separate issues. Matplotlib’s Agg, ps, pdf, and svg backends are non-interactive; they can produce output without opening a GUI window. TkAgg is an interactive option, but it requires Tk bindings, which may need a separate package such as python3-tk on some systems. Matplotlib installation guide
The current guide also cautions that uv often uses Python builds from python-build-standalone, and only recent builds from August 2025 onward work properly with TkAgg. It recommends uv 0.8.7 or newer and updating or reinstalling the bundled Python. As an alternative, it gives uv add matplotlib pyside6 to install a GUI framework. These notes concern GUI display, not the basic Matplotlib installation. Matplotlib installation guide
To separate a Matplotlib or backend problem from behavior in an IDE or interactive shell, try the official getting-started example in a short script run from a terminal:
import matplotlib.pyplot as plt
import numpy as np
x = np.linspace(0, 2 * np.pi, 200)
y = np.sin(x)
fig, ax = plt.subplots()
ax.plot(x, y)
plt.show()
This example also requires NumPy to be importable in the same environment. Matplotlib getting started
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




