I have a fresh install of Ubuntu 13.04 and am trying to use the python library matlibplot. I installed it via sudo apt-get install python-matplotlib and this seemed to be successful. However, then I try to run a python script with import matplotlib, I get the following exception message:
Traceback (most recent call last):
File "./simulate.py", line 6, in <module>
import matplotlib
File "/usr/lib/pymodules/python2.7/matplotlib/__init__.py", line 165, in <module>
from matplotlib.rcsetup import (defaultParams,
File "/usr/lib/pymodules/python2.7/matplotlib/rcsetup.py", line 20, in <module>
from matplotlib.colors import is_color_like
File "/usr/lib/pymodules/python2.7/matplotlib/colors.py", line 54, in <module>
import matplotlib.cbook as cbook
File "/usr/lib/pymodules/python2.7/matplotlib/cbook.py", line 34, in <module>
import new
File "/home/rob/Dropbox/Fourth Year/algo/git/new.py", line 3, in <module>
from pylab import *
File "/usr/lib/pymodules/python2.7/pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "/usr/lib/pymodules/python2.7/matplotlib/pylab.py", line 219, in <module>
from cbook import flatten, is_string_like, exception_to_str, \
ImportError: cannot import name flatten
This has happened previously (and I was not able to get around it). There does not seem anyone who has had the same problem.
Does anyone know of a solution?