Matplotlib Not Working Anymore Due To Interactive Issue
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 crash
Solution 1:
If you read through files in the stack trace,
new.py
-> /matplotlib/__init__.py
-> matplotlib/rcsetup.py
, /matplotlib/colors.py
-> /matplotlib/cbook.py
--> /home/federico/Documents/../new.py -> matplotlib/pyplot.py
You have named your module new
which is shadowing with an import in matplolib.cbook
, which is causing you to try to imort pyplot
while you are importing pyplot
which aparently blows up (exactly why is above my paygrade). You just need to re-name your module to something other than new.py
(and remember to remove the new.pyc
file that got created).
As a test run import matplotlib.pyplot as plt
in an interactive shell.
FYI this is what you are shadowing.
This import will be removed in mpl 1.3
Post a Comment for "Matplotlib Not Working Anymore Due To Interactive Issue"