I am fairly new to python as well as matplotlib and I can't get it to work. From the code :
import networkx as nx
import matplotlib.pyplot as plt
G=nx.Graph()
G.add_node("spam")
G.add_edge(1,2)
plt.show()
I get the error:
Traceback (most recent call last):
File "test.py2", line 2, in <module>
import matplotlib.pyplot as plt
ImportError: No module named matplotlib.pyplot
This occurs even though it seems to be installed in:
usr/lib/python2.7/dist-packages/matplotlib/
Do you guys have any ideas? Thanks in advance
which pythonto check your python path