I'm trying to import matplotlib
on Ubuntu. I reinstalled matplotlib from source because i couldn't use the TkAgg
backend. Now I'm facing a new problem which I cannot solve and also can't find the solution anywhere. I'm using Python 3.5.
I have this error showing me when i run a simple import:
Traceback (most recent call last):
File "plot_test.py", line 17, in <module>
import matplotlib
File "/usr/local/lib/python3.5/site-packages/matplotlib-2.0.0b3+1955.g888bf17-py3.5-linux-x86_64.egg/matplotlib/__init__.py", line 1174, in <module>
rcParams = rc_params()
File "/usr/local/lib/python3.5/site-packages/matplotlib-2.0.0b3+1955.g888bf17-py3.5-linux-x86_64.egg/matplotlib/__init__.py", line 1017, in rc_params
return rc_params_from_file(fname, fail_on_error)
File "/usr/local/lib/python3.5/site-packages/matplotlib-2.0.0b3+1955.g888bf17-py3.5-linux-x86_64.egg/matplotlib/__init__.py", line 1149, in rc_params_from_file
config = RcParams([(key, default) for key, (default, _) in iter_params
File "/usr/local/lib/python3.5/site-packages/matplotlib-2.0.0b3+1955.g888bf17-py3.5-linux-x86_64.egg/matplotlib/__init__.py", line 901, in __init__
self[k] = v
File "/usr/local/lib/python3.5/site-packages/matplotlib-2.0.0b3+1955.g888bf17-py3.5-linux-x86_64.egg/matplotlib/__init__.py", line 918, in __setitem__
cval = self.validate[key](val)
File "/usr/local/lib/python3.5/site-packages/matplotlib-2.0.0b3+1955.g888bf17-py3.5-linux-x86_64.egg/matplotlib/rcsetup.py", line 844, in validate_cycler
cycler_inst.change_key(prop, norm_prop)
AttributeError: 'Cycler' object has no attribute 'change_key'
I think it has maybe something to do with cycler import from rcsetup.py because there is a comment which says that:
# Don't let the original cycler collide with our validating cycler
So the original whatever this is, is colliding with their cycler?
How can I fix this? Any suggestions? Thanks!
Just checked the version of cycler and it was outdated. Just update cycler with
sudo pip3 install --upgrade cycler
or
sudo -H python3 -m pip install --upgrade cycler
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With