Module 'matplotlib' has no attribute 'colors'

Viewed 16084

I am running an Anaconda installation of Python3 64bit on Windows. I have no idea how to put those words in a proper sentence, but I hope it gives enough information. I am taking an Udacity course which wants me to run %matplotlib inline. This gives the following error:

AttributeError: module 'matplotlib' has no attribute 'colors'

I get the same error when I run from matplotlib import pylab, but i get no error from import matplotlib.

I installed matplotlib as follows: conda install -n tensorflow -c conda-forge matplotlib.

How do I solve this error?

Kind regards

Per request:
conda list gives

matplotlib 2.1.0 py36_1 conda-forge

and a list of other modules.

2 Answers

The notebook needs to be restarted for the new installations to take effect.

You just need to upgrade matplotlib.

pip3 install -U matplotlib

Related