0

I am trying to run some python on a Raspberry Pi. I am using: Import matplotlib.pyplot as plt

I tryed installing Matplotlib many ways: pip install matplotlib, pip3 install matplotlib, sudo apt-get install python3-matplotlib,

I keep getting the ImportError: No module named matplotlib.pyplot

Thanks for helping

  • almost certainly because your pip and your python are not in the same environment. Try `which pip` and `which python`. Try `python -m pip install matplotlib`, which will force the install into the same environment as your python. – Jody Klymak Apr 23 '22 at 00:26
  • https://matplotlib.org/3.1.3/faq/virtualenv_faq.html Also see here – hd1 Apr 23 '22 at 00:26
  • You can also see then modern version of the above: https://matplotlib.org/stable/users/installing/index.html#frequently-asked-questions – Jody Klymak Apr 23 '22 at 00:29

0 Answers0