I was working with python and matplotlib but my script crashed so I had to turn off the terminal (Ubuntu 12.04, matplotib-1.1.0, python2.7).
Now if I try to run any script it crashes on the line
import matplotlib.pyplot as plt
with the following error
Traceback (most recent call last):
File "new.py", line 4, in <module>
import matplotlib.pyplot as plt
File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.2.0-py2.7-linux-i686.egg/matplotlib/__init__.py", line 151, in <module>
from matplotlib.rcsetup import (defaultParams,
File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.2.0-py2.7-linux-i686.egg/matplotlib/rcsetup.py", line 20, in <module>
from matplotlib.colors import is_color_like
File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.2.0-py2.7-linux-i686.egg/matplotlib/colors.py", line 54, in <module>
import matplotlib.cbook as cbook
File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.2.0-py2.7-linux-i686.egg/matplotlib/cbook.py", line 32, in <module>
import new
File "/home/federico/Documents/doc_uni/idraulica_ambientale/relazione/scripts/variabili/new.py", line 4, in <module>
import matplotlib.pyplot as plt
File "/usr/local/lib/python2.7/dist-packages/matplotlib-1.2.0-py2.7-linux-i686.egg/matplotlib/pyplot.py", line 23, in <module>
from matplotlib import _pylab_helpers, interactive
ImportError: cannot import name interactive
Notice the last line.
I tried removing and reinstalling matplotlib both from source and from pip and easy_install but I can't get away with it. Same error happens if I try to import from within the python interpreter.
I also installed version 1.2.0 to see if that work but it does not.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…