python - ImportError: No module named pyplot -


i'm using ubuntu 14.04 lts.

and installed python-matplotlib using apt-get command.

when using code in python command-line,

#!/bin/python # -*- coding: utf8 -*-  # test.py  import matplotlib.pyplot plt plt.plot([1, 2, 3, 4]) plt.ylabel('some numbers') plt.show() 

this works.

but when using .py file, error appears.

traceback (most recent call last):   file "test.py", line 6, in <module>     import matplotlib.pyplot plt   file "/home/cloud/dropbox/dc/hw02/matplotlib.py", line 6, in <module> importerror: no module named pyplot 

please help..

as evident traceback, have named file matplotlib.py. thus, python trying local import. rename file other matplotlib.py.


Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -