🌐
Matplotlib
matplotlib.org β€Ί stable β€Ί install β€Ί index.html
Installation β€” Matplotlib 3.10.8 documentation
Matplotlib is available both via the anaconda main channel ... If you are using the Python version that comes with your Linux distribution, you can install Matplotlib via your package manager, e.g.:
🌐
Reddit
reddit.com β€Ί r/learnpython β€Ί how to install a library (matplotlib)
r/learnpython on Reddit: How to install a library (matplotlib)
March 16, 2024 -

So I need to install matplotlib for a school project, and I've installed pip on my mac already. I've verified that I installed it on terminal, but now I don't know how to install or use matplotlib. I wrote "pip install matplotlib", and something seemed to be happening. At the end it said successfully installed, but if I write "import matplotlib" in pycharm it doesnt work...

The tutorial websites dont say anything, or at least I couldnt find anything
What do I do?

Discussions

How to install Matplotlib in Python 3 on Windows - Stack Overflow
Matplotlib tell us that the requirement is Python 2.4 or later but not Python3. Now I'm working with Python3 and I need some plot from Matplotlib. So how do I solve it? More on stackoverflow.com
🌐 stackoverflow.com
python - How to install matplotlib - Stack Overflow
I installed python3.2 in ubuntu (the default edition is not deleted), and I follow the steps in here However when i use python3.2 setup.py install I got: "error: command 'gcc' failed with exit More on stackoverflow.com
🌐 stackoverflow.com
Help installing Matplotlib
Try "pip install matplotlib" More on reddit.com
🌐 r/learnprogramming
9
1
April 27, 2022
Very new to Python, how do I install matplotlib?
pip install matplotlib If you don't have pip, your version of python is too old. More on reddit.com
🌐 r/learnpython
8
2
July 24, 2018
People also ask

Can I install Matplotlib in Python without administrator rights?
Yes, using the --user flag with pip allows installation without admin privileges, for example: pip install --user matplotlib.
🌐
guvi.in
guvi.in β€Ί blog β€Ί python β€Ί how to install matplotlib in python
How To Install Matplotlib In Python
Is Matplotlib compatible with Python virtual environments?
Yes, installing Matplotlib inside a virtual environment isolates it from other projects and prevents dependency conflicts.
🌐
guvi.in
guvi.in β€Ί blog β€Ί python β€Ί how to install matplotlib in python
How To Install Matplotlib In Python
Are there alternatives to Matplotlib for Python data visualization?
Yes, libraries like Seaborn, Plotly, and Bokeh offer additional features and interactive plotting options alongside Matplotlib.
🌐
guvi.in
guvi.in β€Ί blog β€Ί python β€Ί how to install matplotlib in python
How To Install Matplotlib In Python
🌐
PyPI
pypi.org β€Ί project β€Ί matplotlib
matplotlib Β· PyPI
Matplotlib produces publication-quality figures in a variety of hardcopy formats and interactive environments across platforms. Matplotlib can be used in Python scripts, Python/IPython shells, web application servers, and various graphical user interface toolkits. See the install documentation, which is generated from /doc/install/index.rst
      Β» pip install matplotlib
    
Published Β  Dec 10, 2025
Version Β  3.10.8
🌐
W3Schools
w3schools.com β€Ί python β€Ί matplotlib_getting_started.asp
Matplotlib Getting Started
If this command fails, then use a python distribution that already has Matplotlib installed, like Anaconda, Spyder etc.
🌐
University of Vermont
uvm.edu β€Ί ~cbcafier β€Ί python-tooling β€Ί matplotlib_mac.html
Installing Matplotlib (macOS) – Clayton Cafiero
January 5, 2025 - Once this is done, you should see a screen indicating that matplotlib has been installed. Click the button labeled β€œClose.” Β· In the Python shell (within Thonny) type import matplotlib at the prompt and hit return.
🌐
GUVI
guvi.in β€Ί blog β€Ί python β€Ί how to install matplotlib in python
How To Install Matplotlib In Python
February 2, 2026 - Learn how to install Matplotlib in Python step by step. This beginner-friendly guide explains what Matplotlib is, why it matters, and how to set it up correctly for data visualization.
Find elsewhere
Top answer
1 of 6
51

Matplotlib supports python 3.x as of version 1.2, released in January, 2013.

To install it, have a look at the installation instructions. In general, call pip install matplotlib or use your preferred mechanism (conda, homebrew, windows installer, system package manager, etc). In some cases you may need to install additional non-python dependencies (libpng and freetype) through your system's package manager.

The answer below is left for historical reasons and as an example of installing the development version from github.


The current release of matplotlib doesn't support python3.

There's a github branch for python3 support for a couple of years now, but it hasn't been stable on anything other than linux until fairly recently. I believe that branch was recently merged back into the main branch.

If you want to use matplotlib on python3, you'll need to build from the current tip https://github.com/matplotlib/matplotlib

To build it, do something similar to the following:

git clone https://github.com/matplotlib/matplotlib
cd matplotlib
python3 setup.py build
sudo python3 setup.py install

If you don't have git installed, then you can just download a tarball of the current git tip instead: https://github.com/matplotlib/matplotlib/tarball/master

You'll need to have numpy installed for python3. (Installing it for python2 doesn't install it for python3.)

In most cases, that's all you'll need to do. For a default install, the only non-included python library is numpy. The other dependencies (e.g. libpng, freetype) are system libraries and if you can build matplotlib for python2, you already have them.

If you want a non-default install (e.g. if you want any of the non-default backends), then you'll need to copy the setup.cfg.default template to setup.cfg and edit it to match what you want. You'll probably only need to do this if you're planning to embed matplotlib in a gtk or qt application that you're writing, in which case you'll want the gtkagg or qtagg backends instead of just the default tkagg backend.

2 of 6
23

just to bump @endolith's comment up to answer level, from at least uBuntu 14-04 linux onwards, matplotlib support for python3 is built-in with apt:

sudo apt-get install python3-matplotlib

should install matplotlib for python3 with the necessary dependencies.

🌐
Project Jupyter
jupyter.org
Project Jupyter | Home
Jupyter supports over 40 programming languages, including Python, R, Julia, and Scala.
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί installation guide β€Ί install-matplotlib-python
How to Install Matplotlib on python? - GeeksforGeeks
July 18, 2025 - This will download and install the latest version of Matplotlib from the Python Package Index (PyPI).
🌐
Scaler
scaler.com β€Ί home β€Ί topics β€Ί matplotlib β€Ί how to install matplotlib in python?
How to Install Matplotlib in Python? - Scaler Topics
April 20, 2024 - Download python from the official website according to your operating system and install it. Next, install Matplotlib using the following PIP command in the command prompt terminal:
🌐
Alma Better
almabetter.com β€Ί bytes β€Ί articles β€Ί how-to-install-matplotlib-in-python
How to Install Matplotlib in Python with Detailed Steps
May 4, 2025 - If Python is not installed, download ... varies depending on your operating system. To install Matplotlib, you can use Python's package manager, pip....
🌐
TensorFlow
tensorflow.org β€Ί install β€Ί pip
Install TensorFlow with pip
If the GPU test in the last section was unsuccessful, the most likely cause is that components aren't being detected, and/or conflict with the existing system CUDA installation. So you need to add some symbolic links to fix this. ... pushd $(dirname $(python -c 'print(__import__("tensorflow").__file__)')) ln -svf ../nvidia/*/lib/*.so* .
comprehensive library for creating static, animated, and interactive visualizations in Python
Matplotlib (portmanteau of MATLAB, plot, and library) is a plotting library for the Python programming language and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications … Wikipedia
Factsheet
Original author John D. Hunter
Developers Michael Droettboom, et al.
Initial release 2003; 23 years ago (2003)
Factsheet
Original author John D. Hunter
Developers Michael Droettboom, et al.
Initial release 2003; 23 years ago (2003)
🌐
Matplotlib
matplotlib.org
Matplotlib β€” Visualization with Python
Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python.
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί how-to-install-matplotlib-on-macos
How to Install Matplotlib on MacOS? | GeeksforGeeks
September 30, 2021 - Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Follow the below steps to install the Matplotlib package on macOS using pip:
🌐
DevGenius
blog.devgenius.io β€Ί how-to-install-matplotlib-in-python-using-pip-0506826daa3b
How to install matplotlib in Python using pip? | by Let's Decode | Dev Genius
March 4, 2024 - Step 1: Ensure that Python is already ... cmd if you are in the Windows operating system. Step 3: Type the command pip install matplotlib in your system shell/terminal or cmd....
🌐
Trinket
trinket.io β€Ί embed β€Ί python3 β€Ί a5bd54189b
Online Python compiler
This is a Python 3 trinket. It includes everything in Python 3.9.6 as well as scientific libraries like Numpy and SciPy and matplotlib , with more on the way.