I am aware that this exact same question has been asked before. I did follow the instructions given in the answer there, and it didn\'t solve my problem (and I don\'t have e
I ran into this problem as well. I updated my Anaconda-Navigator and the next time I opened a project with matplotlib.pyplot
, I ran into a similar problem. What worked for me was:
conda install libpng
Some python packages link dynamically against native c libraries. After an update of one of those libraries, links can break and give you weird error messages about missing dynamic libraries, as seen in the error message in the question.
Basically, after an update of a native library sometimes you also have to rebuild python packages (here matplotlib
).
The above statement is true in general. If you are using conda
as your python distribution things are usually less complicated:
For extension packages conda
also maintains required c libraries. As long as you use only conda install
and conda update
for installing those packages you should not run into these issues.
For numpy
, scipy
, matplotlib
and many more I would suggest to try conda search <library name>
first to see if there's a conda
recipe that matches your needs. For most users conda install <library name>
will be a better option than pip install
.
To make sure that only conda
's version is installed you can do
conda remove matplotlib
pip uninstall matplotlib
conda install matplotlib
Afterwards this issue should not appear anymore.
I had this problem, but it was because I had set
export DYLD_LIBRARY_PATH="/Users/charlesmartin14/anaconda/lib":$DYLD_LIBRARY_PATH
removing this setting and restarting the shell fixed it