[Solved]: AttributeError: module 'matplotlib' has no attribute 'artist'

Problem:

  File "UsersuserAnaconda3libsite-packagesmatplotlibpyplot.py", line 32, in     import matplotlib.colorbar  File "UsersuserAnaconda3libsite-packagesmatplotlibcolorbar.py", line 28, in     import matplotlib.artist as martistAttributeError: module 'matplotlib' has no attribute 'artist'

Solution:

Try  this:

conda uninstall matplotlib

and then :

conda install matplotlib

Stack Trace
Stack Trace

$ sudo conda install matplotlib

Password:

Solving environment: done

## Package Plan ##

  environment location: /Users/admin/anaconda3

  added / updated specs:

    - matplotlib

The following packages will be downloaded:

    package                    |            build

    ---------------------------|-----------------

    matplotlib-3.0.2           |   py36h54f8f79_0         6.5 MB

    libpng-1.6.35              |       ha441bb4_0         318 KB

    ------------------------------------------------------------

                                           Total:         6.8 MB

The following NEW packages will be INSTALLED:

    matplotlib: 3.0.2-py36h54f8f79_0

The following packages will be UPDATED:

    libpng:     1.6.34-he12f830_0    --> 1.6.35-ha441bb4_0

Proceed ([y]/n)? y

Downloading and Extracting Packages

matplotlib-3.0.2     | 6.5 MB    | ########################################################################################################################################## | 100%

libpng-1.6.35        | 318 KB    | ########################################################################################################################################## | 100%

Preparing transaction: done

Verifying transaction: done

Executing transaction: done