Matplotlib AttributeError: 'module' object has no attribute 'popall'

I have solved my problem although I am not entirely sure why this has solved it.

I used pip uninstall matplotlib, to remove the python install, and also updated my ~/.zshrc and ~/.bash_profile paths to contain:

HomeBrew:

export PATH=/usr/local/bin:$PATH

Python:

export PATH=/usr/local/share/python:$PATH

This has solved the issue. I am guessing the issue was caused by having two install of matplotlib and having the path in ~/.bash_proile but not the ~/.zshrc.


I have had a similar kind of problem what I did was trying to upgrade my matplotlib using

pip install -U matplotlib

and then reopen anaconda to see it working


I had this exact error and in my case it turned out to be that both pip and conda had installed copies of matplotlib. In a 'mixed' environment with pip used to fill gaps in Anaconda, pip can automatically install upgrades to (already-installed) dependencies of the package you asked to install, creating duplication.

To test for this:

$ conda list matplotlib
# packages in environment at /home/ec2-user/anaconda3:
# 
matplotlib                2.0.2               np113py35_0
matplotlib                2.1.1                     <pip>

Problem! Fix:

$ pip uninstall matplotlib

Probably a good idea to force matplotlib upgrade to the version pip wanted:

$ conda install matplotlib=2.1.1