I am using the Anaconda distribution for Windows 10 (Anaconda3 specifically), and I have a large variety of packages installed, relevant packages could be python 3.5.1, numpy 1.10.4, jupyter 1.0.0 (with the client, console, and core packages), matplotlib 1.5.1 (np110py35_0), notebook 4.1.0, and uncertainties 2.4.7.1.
When I try to import matplotlib.pyplot this is what I am getting:
import matplotlib.pyplot as plt
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-eff513f636fd> in <module>()
----> 1 import matplotlib.pyplot as plt
C:\Users\Michael\Anaconda3\lib\site-packages\matplotlib\pyplot.py in <module>()
34 from matplotlib import docstring
35 from matplotlib.backend_bases import FigureCanvasBase
---> 36 from matplotlib.figure import Figure, figaspect
37 from matplotlib.gridspec import GridSpec
38 from matplotlib.image import imread as _imread
C:\Users\Michael\Anaconda3\lib\site-packages\matplotlib\figure.py in <module>()
33 from matplotlib.cbook import Stack, iterable
34
---> 35 from matplotlib import _image
36 from matplotlib.image import FigureImage
37
C:\Users\Michael\Anaconda3\lib\site-packages\matplotlib\_image.cp35-win_amd64.pyd in <module>()
C:\Users\Michael\Anaconda3\lib\site-packages\matplotlib\_image.cp35-win_amd64.pyd in __bootstrap__()
C:\Users\Michael\Anaconda3\lib\imp.py in load_dynamic(name, path, file)
340 spec = importlib.machinery.ModuleSpec(
341 name=name, loader=loader, origin=path)
--> 342 return _load(spec)
343
344 else:
ImportError: DLL load failed: The specified module could not be found.
This error occurred while I was working with some data in the jupyter notebook. Upon starting the notebook and importing the modules I needed, the notebook was running just fine. However, at one point the notebook I had been working on had been cluttered with variables, so I decided to restart the kernel via the command bar in the top part of the notebook and run it again (a very normal thing for me to do that I have done multiple times without problems.
It might be worth noting I was using numpy, matplotlib.pyplot, and the uncertainties package at the time. When I restarted the kernel though, I got that ImportError listed above.
Before starting the notebook, I used conda update --all (as I usually do), and everything was working normally. The problem occurred after I had restarted the kernel a few times.
The solutions I have tried and have had no success with are:
- restarting the jupyter notebook and loading it again
- creating a new, clean jupyter notebook (.ipynb file) and attempting to use import matplotlib.pyplot as plt again
- trying to revert to a more stable version of anaconda by using conda update anaconda
I am wary when it comes to re-installing Anaconda by using conda install anaconda, or uninstalling and re-installing matplotlib. I am worried it might interfere with some of my other packages, so I wanted to see if there were other options first.
Any help would be appreciated, thank you!