1

I'm kind of new to RPi. I need to plot a data stream received on some of GPIO pins. I've decided to use matplotlib for the project. however I'm stuck at stage 1: install and import matplotlib! I've already checked here and here. but when I try to run import matplotlib.pyplot as plt with either python or python3, I get the following error:

Traceback (most recent call last):
  File "test.py", line 2, in <module>
    from matplotib import pyplot as plt
ImportError: No module named 'matplotib'

any help as to how to properly install and import matplotib (preferably with python3) is greatly appreciated. also if there is another package that is easier to install and use, I'd like to know ;).

EDIT: I'm using rasbian Stretch (release date: Release date: 2018-04-18) from here on RaspberryPi 3B

1

No module named 'matplotib' looks like a simple typo in your python script. Change matplotib (a "l" is missing) to matplotlib and it should work.

  • that was probably the dumbest mistake I've made, :D thanks a lot – Ho'jat Kaveh May 2 '18 at 15:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.