I'm on linux mint 18.3. I can import matplotlib fine, but I need to plot something from a certain file. When I try to plot something simple, I get this error:
python3 spline.py
Traceback (most recent call last):
File "spline.py", line 2, in <module>
from matplotlib.pyplot import plt
ImportError: No module named 'matplotlib'
my code in the file is:
from matplotlib.pyplot import plt
plt.plot([1, 2, 3],[2, 4, 6])
plt.show()
already tried:
pip install matplotlib
sudo apt-get install python-matplotlib
sudo apt-get install python3-matplotlib