How To Install Matplotlib and Numpy on RaspberryPi Zero

Hello House,
I tried to install matplotlib on my RaspberryPi Zero but it failed. I used the following commands:

pip install matplotlib ------ this installation failed outrightly.

sudo apt-get install python-matplotlib ----- this installation went through but it was installed in a location called python 2.7.1. So when I tried using the matplotlib, the system complained that there is no module called matplotlib.

I also noticed that numpy is already installed on the RaspberryPi but also in the python 2.7.1 location. Surprisingly it works but it cannot update to the most recent version of numpy.
Can someone guide me to install these packages correctly please?
Thank you.


Very interesting question, I have a Raspberry PI 3 and always wonder if I can install Python and automate some boring activities. A source of information that might help be would be in a Raspberry Pi forum :


Thanks so much. I was able to find a helpful guide there.

1 Like

You are welcome !!!
I´ve notice that you post your question vary fast there. That forum is very useful for “Raspberians”.

Yea, thanks once again.

1 Like