F
F
FunnyJingle2016-03-08 15:58:53
Python
FunnyJingle, 2016-03-08 15:58:53

What is the error when importing matplotlib?

When importing matplotlib, an error is thrown:

Traceback (most recent call last):
  File "D:/Dropbox/Modeling/ttt/aaa", line 4, in <module>
    import matplotlib.pyplot as plt
  File "D:\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 36, in <module>
    from matplotlib.figure import Figure, figaspect
  File "D:\Anaconda3\lib\site-packages\matplotlib\figure.py", line 35, in <module>
    from matplotlib import _image
  File "D:\Anaconda3\lib\site-packages\matplotlib\_image.py", line 7, in <module>
    __bootstrap__()
  File "D:\Anaconda3\lib\site-packages\matplotlib\_image.py", line 6, in __bootstrap__
    imp.load_dynamic(__name__,__file__)
  File "D:\Anaconda3\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
ImportError: DLL load failed: Не найден указанный модуль.

Numpy and SciPy from anaconda (x64) load fine. IDE - PyCharm 5.0.1, interpreter - Anaconda. Tried to update it, no effect.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
F
FunnyJingl, 2016-03-09
@FunnyJingle

One of these helped:
conda update -f matplotlib

A
Andrey Druzhaev, 2016-03-08
@borodaturan

There can be many reasons. To get started, try simply displaying the name of the library that matplotlib is trying to import without success. Maybe some additional package is simply missing.
I don't know how things are with Anaconda, never used it, but I had a problem importing matplotlib when I mistakenly installed an old version of Numpy that didn't work on MKL. After updating Numpy, everything worked.

S
s0ci0pat, 2016-03-09
@s0ci0pat

Check for msvcp71.dll in C:\windows\system32\

A
Andy_U, 2016-03-09
@Andy_U

I stepped on a similar rake with python 3.5 (see https://toster.ru/q/248442). There, the installation of redistributable for VS 2015 helped me. Which python is in Anaconda, and which redist version of VIsual Studio is needed - you have to look.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question