Dll load failed не найден указанный модуль matplotlib
Windows 10 machine w/Anaconda 5 and Python 3.6.
I deleted full old Anaconda folder and installed Anaconda on top of it. Possible this caused some issues and am willing to give a whirl at the "proper" uninstall method (couldn't find docs on that).
Until then, this is what I've got as an issue and am logging here. Please feel free to request any additional details.
Actual Error Trace:
ImportError Traceback (most recent call last)
in ()
2 import io
3 import scipy.misc as misc
----> 4 import matplotlib.pyplot as plt
5 get_ipython().magic('matplotlib inline')
6
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\pyplot.py in ()
27 from cycler import cycler
28 import matplotlib
---> 29 import matplotlib.colorbar
30 from matplotlib import style
31 from matplotlib import _pylab_helpers, interactive
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\colorbar.py in ()
34 import matplotlib.collections as collections
35 import matplotlib.colors as colors
---> 36 import matplotlib.contour as contour
37 import matplotlib.cm as cm
38 import matplotlib.gridspec as gridspec
C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\contour.py in ()
19 import matplotlib.colors as colors
20 import matplotlib.collections as mcoll
---> 21 import matplotlib.font_manager as font_manager
22 import matplotlib.text as text
23 import matplotlib.cbook as cbook
ImportError: DLL load failed: The specified procedure could not be found.
The text was updated successfully, but these errors were encountered:
13 Answers 13
These following commands worked for me. I think problem is with the new matplotlib version 3.3.1. I downgraded to matplotlib 3.0.3.
I uninstalled the newer version, then reopen command prompt and installed matplotlib 3.0.3. It's worked for me. I am not sure if it will work for you, so I recommend to check out the discussion.
On Windows 10, using virtual env with miniconda, and python 3.7, down grading to matplotlib-3.0.3 worked for me.
Someone hand this person a medal. Out of all the internet's solution this simple one did the job. Thank you so much.
Things changed. Your method does not work now. ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Consider an update to your answer?
This solves my problem
As a workaround until matplotlib 3.1.1 is released, you could install this package msvc-runtime using the following command:
This worked for me on Windows 10 (using the Anaconda prompt):
You need to have Visual Studio c++ in Your System.
Install Visual Studio 2019 with c++ distributions .
It worked perfectly for me.
installing visual studio c++ is what fixed it for me (win10, python 3.9.1, matplotlib 3.3.3) direct link to visual studio c++ x64 download here
This worked for me on Windows 10:
As specified in PEP 11, a Python release only supports a Windows platform while Microsoft considers the platform under extended support. This means that Python 3.7 supports Windows Vista and newer. If you require Windows XP support then please install Python 3.4.
- For Python 3.6+ you need to have Windows Service Pack 1 installed.
In case Windows Service Pack isn't installed. You can download Windows 7 Service Pack 1 (SP1) manually from here or also you can download it from Windows Update of Windows 7.
-
Python needs the Microsoft C runtime for Visual Studio 2015, especially the file ucrtbase.dll.
So, you need to install Microsoft Visual C++ redistribution 2015 from here.
You don't need to install Microsoft Visual Studio just C++ redistributions of 2015 will do the job.
ImportError: DLL load failed: The specified module could not be found when importing matplotlib. On another PC it works fine, the same Python 3.7.3 and packages.
Code for reproduction
Outcome
Matplotlib version
- Operating system: Win 10 x64
- Matplotlib version: 3.1.0
- Python version: 3.7.3
Installed via pip using poetry.
The text was updated successfully, but these errors were encountered:
drcrook1 commented Oct 16, 2017
Appears to be the same:
(C:\ProgramData\Anaconda3) C:\Users\DrCrook\Documents>python
Python 3.6.2 |Anaconda custom (64-bit)| (default, Sep 19 2017, 08:03:39) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
from matplotlib import ft2font
Traceback (most recent call last):
File "", line 1, in
ImportError: DLL load failed: The specified procedure could not be found.
tacaswell commented Mar 30, 2020
frank-yifei-wang commented Dec 14, 2019
import matplotlib works fine but import matplotlib.pyplot as plt throws the error.
I'm getting the error for import matplotlib as well
I tried uninstalling and reinstalling the older version but the error still remains
Try a "clean reinstallation"?
If still not working redo this but use pip install matplotlib==3.0.3 instead. Hope it works out for you.
CompPhysChris commented Nov 14, 2017 •
_license 1.1 py36_1
alabaster 0.7.10 py36hcd07829_0
anaconda custom py36h363777c_0
anaconda-client 1.6.5 py36hd36550c_0
anaconda-project 0.8.0 py36h8b3bf89_0
asn1crypto 0.22.0 py36h8e79faa_1
astroid 1.5.3 py36h9d85297_0
astropy 2.0.2 py36h06391c4_4
babel 2.5.0 py36h35444c1_0
backports 1.0 py36h81696a8_1
backports.functools_lru_cache 1.4 py36_1 conda-forge
backports.shutil_get_terminal_size 1.0.0 py36h79ab834_2
beautifulsoup4 4.6.0 py36hd4cc5e8_1
better-apidoc 0.1.2
bitarray 0.8.1 py36h6af124b_0
bkcharts 0.2 py36h7e685f7_0
blaze 0.11.3 py36h8a29ca5_0
bleach 2.0.0 py36h0a7e3d6_0
bleach 2.0.0
bokeh 0.12.10 py36h0be3b39_0
boto 2.48.0 py36h1a776d2_1
bottleneck 1.2.1 py36hd119dfa_0
bzip2 1.0.6 haa5b126_2
ca-certificates 2017.08.26 h94faf87_0
cachecontrol 0.12.3 py36hfe50d7b_0
certifi 2017.7.27.1 py36h043bc9e_0
cffi 1.10.0 py36hae3d1b5_1
chardet 3.0.4 py36h420ce6e_1
click 6.7 py36hec8c647_0
cloudpickle 0.4.0 py36h639d8dc_0
clyent 1.2.2 py36hb10d595_1
colorama 0.3.9 py36h029ae33_0
colorcet 0.9.1
comtypes 1.1.2 py36heb9b3d1_0
conda 4.3.30 py36h7e176b0_0
conda-env 2.6.0 h36134e3_1
console_shortcut 0.1.1 h6bb2dd7_3
contextlib2 0.5.5 py36he5d52c0_0
cryptography 2.0.3 py36h123decb_1
curl 7.55.1 h3b839b5_4
cycler 0.10.0 py36h009560c_0
cython 0.26.1 py36h18049ac_0
cytoolz 0.8.2 py36h547e66e_0
dask 0.15.4 py36hd19ff53_0
dask-core 0.15.4 py36h22c9028_0
datashape 0.5.4 py36h5770b85_0
decorator 4.1.2 py36he63a57b_0
dill 0.2.7.1
distlib 0.2.5 py36h51371be_0
distributed 1.19.1 py36h8504682_0
DM3Utils 0.1
docutils 0.14 py36h6012d8f_0
entrypoints 0.2.3 py36hfd66bb0_2
et_xmlfile 1.0.1 py36h3d2d736_0
fastcache 1.0.2 py36hffdae1b_0
FileGrammar 0.1
filelock 2.0.12 py36hd7ddd41_0
flask 0.12.2 py36h98b5e8f_0
flask-cors 3.0.3 py36h8a3855d_0
freetype 2.8 h51f8f2c_1
get_terminal_size 1.0.0 h38e98db_0
gevent 1.2.2 py36h342a76c_0
git 2.14.1 h8288424_2
glob2 0.5 py36h11cc1bd_1
greenlet 0.4.12 py36ha00ad21_0
h5py 2.7.1
h5py 2.7.0 py36hfbe0a52_1
hdf5 1.10.1 vc14hb361328_0 [vc14]
heapdict 1.0.0 py36h21fa5f4_0
html5lib 0.999999999 py36ha09b1f3_0
html5lib 0.999999999
icc_rt 2017.0.4 h97af966_0
icu 58.2 vc14hc45fdbb_0 [vc14]
idna 2.6 py36h148d497_1
imageio 2.2.0 py36had6c2d2_0
imagesize 0.7.1 py36he29f638_0
intel-openmp 2018.0.0 hcd89f80_7
ipykernel 4.6.1 py36hbb77b34_0
ipython 6.1.0 py36h236ecc8_1
ipython 6.2.1
ipython_genutils 0.2.0 py36h3c5d0ee_0
ipywidgets 7.0.0 py36h2e74ada_0
ipywidgets 7.0.0
isort 4.2.15 py36h6198cc5_0
itsdangerous 0.24 py36hb6c5a24_1
jdcal 1.3 py36h64a5255_0
jedi 0.10.2 py36hed927a0_0
jedi 0.11.0
jinja2 2.9.6 py36h10aa3a0_1
joblib 0.11
jpeg 9b hb83a4c4_2
jsonschema 2.6.0 py36h7636477_0
jupyter 1.0.0 py36h422fd7e_2
jupyter_client 5.1.0 py36h9902a9a_0
jupyter_console 5.2.0 py36h6d89b47_1
jupyter_core 4.3.0 py36h511e818_0
jupyterlab 0.27.0 py36h34cc53b_2
jupyterlab_launcher 0.4.0 py36h22c3ccf_0
krb5 1.14.2 vc14hfaa12e2_3 [vc14]
lazy-object-proxy 1.3.1 py36hd1c21d2_0
libiconv 1.15 h1df5818_7
libpng 1.6.32 vc14h5163883_3 [vc14]
libssh2 1.8.0 vc14hcf584a9_2 [vc14]
libtiff 4.0.8 vc14h04e2a1e_10 [vc14]
libxml2 2.9.4 vc14h8fd0f11_5 [vc14]
libxslt 1.1.29 vc14hf85b8d4_5 [vc14]
llvmlite 0.20.0 py36_0
locket 0.2.0 py36hfed976d_1
lockfile 0.12.2 py36h0468280_0
lxml 4.1.0 py36h0dcd83c_0
lzo 2.10 vc14h0a64fa6_1 [vc14]
markupsafe 1.0 py36h0e26971_1
matplotlib 2.1.0 py36h11b4b9c_0
matplotlib 2.1.0
mccabe 0.6.1 py36hb41005a_1
menuinst 1.4.10 py36h42196fb_0
mistune 0.8.1 py36h007b88b_0
mkl 2018.0.0 h36b65af_4
mkl-service 1.1.2 py36h57e144c_4
mpmath 0.19 py36he326802_2
msgpack-python 0.4.8 py36h58b1e9d_0
multipledispatch 0.4.9 py36he44c36e_0
multiprocess 0.70.5
nanonispy 1.0.4
nbconvert 5.3.1 py36h8dc0fde_0
nbconvert 5.3.1
nbformat 4.4.0 py36h3a5bc1b_0
nbformat 4.4.0
neo 0.5.1
networkx 2.0 py36hff991e3_0
nltk 3.2.4 py36hd0e0a39_0
nose 1.3.7 py36h1c3779e_2
notebook 5.2.1 py36h4fb2ca6_0
numba 0.35.0 np113py36_10
numexpr 2.6.2 py36h514de0f_2
numpy 1.13.0
numpy 1.13.3
numpy 1.13.3 py36ha320f96_0
numpydoc 0.7.0 py36ha25429e_0
odo 0.5.1 py36h7560279_0
olefile 0.44 py36h0a7bdd2_0
openpyxl 2.4.8 py36hf3b77f6_1
openssl 1.0.2m vc14h7f35f9e_0 [vc14]
packaging 16.8 py36ha0986f6_1
pandas 0.21.0 py36he09d4dd_1
pandoc 1.19.2.1 hb2460c7_1
pandocfilters 1.4.2 py36h3ef6317_1
pandocfilters 1.4.2
parso 0.1.0
partd 0.3.8 py36hc8e763b_0
path.py 10.3.1 py36h3dd8b46_0
pathlib2 2.3.0 py36h7bfb78b_0
pathos 0.2.1
patsy 0.4.1 py36h42cefec_0
pep8 1.7.0 py36h0f3d67a_0
pickleshare 0.7.4 py36h9de030f_0
pillow 4.2.1 py36hdb25ab2_0
Pillow 4.3.0
pip 9.0.1 py36h226ae91_4
pkginfo 1.4.1
pkginfo 1.4.1 py36hb0f9cfa_1
ply 3.10 py36h1211beb_0
pox 0.2.3
ppft 1.6.4.7.1
progress 1.3 py36hbeca8d3_0
prompt-toolkit 1.0.15
prompt_toolkit 1.0.15 py36h60b8f86_0
psutil 5.3.0
psutil 5.4.0 py36h4e662fb_0
psutil 5.4.1
py 1.4.34 py36ha4aca3a_1
pycodestyle 2.3.1 py36h7cc55cd_0
pycosat 0.6.3 py36h413d8a4_0
pycparser 2.18 py36hd053e01_1
pycrypto 2.6.1 py36he68e6e2_1
pycurl 7.43.0 py36h086bf4c_3
pyflakes 1.6.0 py36h0b975d6_0
pygments 2.2.0 py36hb010967_0
pylint 1.7.4 py36ha4e6ded_0
pyodbc 4.0.17 py36h0006bc2_0
pyopenssl 17.2.0 py36h15ca2fc_0
pyparsing 2.2.0 py36h785a196_1
pyqt 5.6.0 py36hb5ed885_5
pyqtgraph 0.10.0
pyreadline 2.1
pysocks 1.6.7 py36h698d350_1
pysptools 0.14.2
pytables 3.4.2 py36h71138e3_2
pytest 3.2.1 py36h753b05e_1
python 3.6.3 h3b118a2_4
python-dateutil 2.6.1 py36h509ddcb_1
pytz 2017.2 py36h05d413f_1
pytz 2017.3
pywavelets 0.5.2 py36hc649158_0
pywin32 221 py36h9c10281_0
pyyaml 3.12 py36h1d1928f_1
pyzmq 16.0.2 py36h38c27d9_2
qt 5.6.2 vc14h6f8c307_12 [vc14]
qtawesome 0.4.4 py36h5aa48f6_0
qtconsole 4.3.1 py36h99a29a9_0
qtpy 1.3.1 py36hb8717c5_0
quantities 0.11.1+36.gacba339
requests 2.18.4 py36h4371aae_1
requests-toolbelt 0.8.0
rope 0.10.5 py36hcaf5641_0
ruamel_yaml 0.11.14 py36h9b16331_2
scikit-image 0.13.0 py36h6dffa3f_1
scikit-learn 0.19.1 py36h53aea1b_0
scipy 1.0.0 py36h1260518_0
seaborn 0.8.0 py36h62cb67c_0
setuptools 36.5.0 py36h65f9e6e_0
setuptools 36.5.0
simplegeneric 0.8.1 py36heab741f_0
singledispatch 3.4.0.3 py36h17d0c80_0
sip 4.19.5
sip 4.18.1 py36h9c25514_2
six 1.11.0
six 1.11.0 py36h4db2310_1
sklearn 0.0
snowballstemmer 1.2.1 py36h763602f_0
sortedcollections 0.5.3 py36hbefa0ab_0
sortedcontainers 1.5.7 py36ha90ac20_0
sphinx 1.6.3 py36h9bb690b_0
sphinx-gallery 0.1.12
sphinx-rtd-theme 0.2.4
sphinxcontrib 1.0 py36hbbac3d2_1
sphinxcontrib-websupport 1.0.1 py36hb5e5916_1
spyder 3.2.4 py36h8845eaa_0
sqlalchemy 1.1.13 py36h5948d12_0
sqlite 3.20.1 h9eeafa9_2
statsmodels 0.8.0 py36h6189b4c_0
sympy 1.1.1 py36h96708e0_0
tblib 1.3.2 py36h30f5020_0
testpath 0.3.1
testpath 0.3.1 py36h2698cfe_0
tk 8.6.7 hcb92d03_3
toolz 0.8.2 py36he152a52_0
tornado 4.5.2 py36h57f6048_0
tqdm 4.14.0
traitlets 4.3.2 py36h096827d_0
twine 1.9.1
typing 3.6.2 py36hb035bda_0
unicodecsv 0.14.1 py36h6450c06_0
urllib3 1.22 py36h276f60a_0
vc 14 h2379b0c_2
vs2015_runtime 14.0.25123 hd4c4e62_2
wcwidth 0.1.7 py36h3d5aa90_0
webencodings 0.5.1
webencodings 0.5.1 py36h67c50ae_1
werkzeug 0.12.2 py36h866a736_0
wget 3.2
wheel 0.29.0 py36h6ce6cde_1
whych 0.2.1
widgetsnbextension 3.0.6
widgetsnbextension 3.0.2
widgetsnbextension 3.0.2 py36h364476f_1
win_inet_pton 1.0.1 py36he67d7fd_1
win_unicode_console 0.5 py36hcdbd4b5_0
wincertstore 0.2 py36h7fe50ca_0
wrapt 1.10.11 py36he5f5981_0
xlrd 1.1.0 py36h1cb58dc_1
xlrd 1.1.0
xlsxwriter 1.0.2 py36hf723b7d_0
xlwings 0.11.4 py36hd3cf94d_0
xlwt 1.3.0 py36h1a4751e_0
yaml 0.1.7 hdd19a5b_2
zict 0.1.3 py36h2d8e73e_0
zlib 1.2.11 h8395fce_2
rameshvesalapu commented Oct 10, 2020
Купил новый компьютер с Windows 10, материнская плата Asus, процессор Ryzen 3200 Vega, и тут началась пляска с бубнами:
- Установил Python 3.8.6 успешно
- Установил matplotlib через pip успешно
- При попытке кодинга с помощью этого плагина выходит следующая ошибка:
>>> import matplotlib.pyplot
Traceback (most recent call last):
File "", line 1, in
import matplotlib.pyplot
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\__init__.py", line 174, in
_check_versions()
File "C:\Users\admin\AppData\Local\Programs\Python\Python38\lib\site-packages\matplotlib\__init__.py", line 159, in _check_versions
from . import ft2font
ImportError: DLL load failed while importing ft2font: Не найден указанный модуль.
Пробовал устанавливать с нуля Windows 10 на трех разных новых компьютерах и с процессорами Intel Core i3, i5 тоже не работает.
Переустановил Windows 10 на свой старый комп: мать Gigabyte, проц AMD Phenom, видео GeForce GT 710 - та же ерунда, как на скриншоте.
Что вообще происходить и как это решить?
Сложный 1 комментарий
В инфернете пишут, что может мешать библиотека freetype.dll от другого приложения (например, от java).
Рекомендуют попробовать так поменять системный path, чтобы папка python, anaconda и других пайтоновских приложений были раньше папки java. Тогда, якобы, оно будет правильную библиотеку находить раньше.
Сам не проверял, дома винды нету вааще.
На Windows 10 нужно понизить версию:
И да, matplotlib это не плагин, а библиотека.
Благодарю за подсказку. К сожалению не помогло. Вылезла ошибка, которая была 3 дня назад при установке стандартной версии. Что вообще происходит с Python?
C:\Users\admin>pip install matplotlib==3.0.3
Collecting matplotlib==3.0.3
Downloading matplotlib-3.0.3.tar.gz (36.6 MB)
|████████████████████████████████| 36.6 MB 6.4 MB/s
ERROR: Command errored out with exit status 1:
command: 'c:\users\admin\appdata\local\programs\python\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-p05r85k1\\matplotlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-p05r85k1\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\admin\AppData\Local\Temp\pip-pip-egg-info-do3clo40'
cwd: C:\Users\admin\AppData\Local\Temp\pip-install-p05r85k1\matplotlib\
Complete output (47 lines):
============================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [3.0.3]
python: yes [3.8.6 (tags/v3.8.6:db45529, Sep 23 2020,
15:52:53) [MSC v.1927 64 bit (AMD64)]]
platform: yes [win32]
REQUIRED DEPENDENCIES AND EXTENSIONS
numpy: yes [version 1.19.2]
install_requires: yes [handled by setuptools]
libagg: yes [pkg-config information for 'libagg' could not
be found. Using local copy.]
freetype: no [The C/C++ header for freetype
(freetype2\ft2build.h) could not be found. You may
need to install the development package.]
png: no [The C/C++ header for png (png.h) could not be
found. You may need to install the development
package.]
qhull: yes [pkg-config information for 'libqhull' could not
be found. Using local copy.]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
toolkits: yes [installing]
tests: no [skipping due to configuration]
toolkits_tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
agg: yes [installing]
tkagg: yes [installing; run-time loading from Python Tcl /
Tk]
macosx: no [Mac OS-X only]
windowing: yes [installing]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
3 разных компьютера и одна ошибка. Образ Windows 10 брался с официального сайта. Уже установлен MS C++ 2015. Что именно не так с компьютерами или что не так я делаю?
~\Envs\py3\lib\site-packages\matplotlib\__init__.py in
172
173
--> 174 _check_versions()
175
176
~\Envs\py3\lib\site-packages\matplotlib\__init__.py in _check_versions()
166 ("pyparsing", "2.0.1"),
167 ]:
--> 168 module = importlib.import_module(modname)
169 if LooseVersion(module.__version__) < minver:
170 raise ImportError("Matplotlib requires <>>=<>; you have <>"
c:\users\179\appdata\local\programs\python\python36\lib\importlib\__init__.py in import_module(name, package)
124 break
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
127
128
ImportError: DLL load failed: Не найден указанный модуль.
- Вопрос задан более года назад
- 354 просмотра
Попробуй сделать и запустить отдельную строчку:
import matplotlib
Если выдаст ошибку, попробуй набрать в строке jupyter:
appdirs==1.4.4
argon2-cffi==20.1.0
attrs==20.1.0
backcall==0.2.0
bleach==3.1.5
certifi==2020.6.20
cffi==1.14.2
colorama==0.4.3
cycler==0.10.0
DateTime==4.3
decorator==4.4.2
defusedxml==0.6.0
distlib==0.3.1
entrypoints==0.3
filelock==3.0.12
importlib-metadata==1.7.0
importlib-resources==3.0.0
ipykernel==5.3.4
ipython==7.16.1
ipython-genutils==0.2.0
ipywidgets==7.5.1
jedi==0.17.2
Jinja2==2.11.2
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client==6.1.7
jupyter-console==6.2.0
jupyter-core==4.6.3
kiwisolver==1.3.0
MarkupSafe==1.1.1
matplotlib==3.3.2
mistune==0.8.4
nbconvert==5.6.1
nbformat==5.0.7
notebook==6.1.3
numpy==1.19.2
packaging==20.4
pandocfilters==1.4.2
parso==0.7.1
pickleshare==0.7.5
Pillow==8.0.1
prometheus-client==0.8.0
prompt-toolkit==3.0.7
pycparser==2.20
Pygments==2.6.1
pyparsing==2.4.7
pyrsistent==0.16.0
python-dateutil==2.8.1
pytz==2020.1
pywin32==228
pywinpty==0.5.7
pyzmq==19.0.2
qtconsole==4.7.7
QtPy==1.9.0
Send2Trash==1.5.0
six==1.15.0
terminado==0.8.3
testpath==0.4.4
tornado==6.0.4
traitlets==4.3.3
virtualenv==20.0.31
virtualenvwrapper-win==1.2.6
wcwidth==0.2.5
webencodings==0.5.1
widgetsnbextension==3.5.1
zipp==3.1.0
zope.interface==5.1.2
Note: you may need to restart the kernel to use updated packages.
ImportError Traceback (most recent call last)
in
----> 1 import matplotlib
c:\users\179\appdata\local\programs\python\python36\lib\site-packages\matplotlib\__init__.py in
172
173
--> 174 _check_versions()
175
176
c:\users\179\appdata\local\programs\python\python36\lib\site-packages\matplotlib\__init__.py in _check_versions()
166 ("pyparsing", "2.0.1"),
167 ]:
--> 168 module = importlib.import_module(modname)
169 if LooseVersion(module.__version__) < minver:
170 raise ImportError("Matplotlib requires <>>=<>; you have <>"
c:\users\179\appdata\local\programs\python\python36\lib\importlib\__init__.py in import_module(name, package)
124 break
125 level += 1
--> 126 return _bootstrap._gcd_import(name[level:], package, level)
127
128
ImportError: DLL load failed: Не найден указанный модуль.
Requirement already satisfied: matplotlib in c:\users\179\appdata\local\programs\python\python36\lib\site-packages (3.3.2)Note: you may need to restart the kernel to use updated packages.
Requirement already satisfied: certifi>=2020.06.20 in c:\users\179\appdata\local\programs\python\python36\lib\site-packages (from matplotlib) (2020.6.20)
Requirement already satisfied: numpy>=1.15 in c:\users\179\appdata\local\programs\python\python36\lib\site-packages (from matplotlib) (1.19.2)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in c:\users\179\appdata\local\programs\python\python36\lib\site-packages (from matplotlib) (2.4.7)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\179\appdata\local\programs\python\python36\lib\site-packages (from matplotlib) (1.3.0)
Requirement already satisfied: cycler>=0.10 in c:\users\179\appdata\local\programs\python\python36\lib\site-packages (from matplotlib) (0.10.0)
Requirement already satisfied: pillow>=6.2.0 in c:\users\179\appdata\local\programs\python\python36\lib\site-packages (from matplotlib) (8.0.1)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\179\appdata\local\programs\python\python36\lib\site-packages (from matplotlib) (2.8.1)
Requirement already satisfied: six in c:\users\179\appdata\local\programs\python\python36\lib\site-packages (from cycler>=0.10->matplotlib) (1.15.0)
snoopy-coder commented Mar 15, 2020
In my case
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:05:16) [MSC v.1915 32 bit (Intel)] on win32
I get the same error as you described:
import matplotlib works fine but import matplotlib.pyplot as plt throws the error.
matplotlib 3.0.3 is already installed, but the error still remains.
PS. I do not know how important this is, but newer versions 3.1.x fall on ft2font.cp37-win32.pyd and version 3.0.3 falls on _contour.cp37-win32.pyd
msarahan commented Nov 14, 2017
What's the output from
conda list
and
conda info
CompPhysChris commented Nov 14, 2017
I mentioned this in another issue, but the culprit is the matplotlib.ft2font import. I tested importing each of the packages individually and the other four worked just fine.
ccordoba12 commented Nov 14, 2017
? Does that fix your problem?
mingwandroid commented Oct 16, 2017
Can you retry from the Anaconda Prompt ?
AlexP11223 commented Jun 17, 2019
As I understand it's not really "fix", it just tells to install VC++ Redist (which version btw?) manually.
cgohlke commented Jun 17, 2019
As I understand it's not really "fix", it just tells to install VC++ Redist
install VC++ Redist (which version btw?) manually
As a workaround until matplotlib 3.1.1 is released, you could pip install msvc-runtime
CompPhysChris commented Nov 14, 2017
No, it's still giving the same error.
CompPhysChris commented Nov 14, 2017
It worked last week. I did conda update --all and my work may have pushed updates to my Windows machine over the weekend. This week I tried to debug some code and started getting the error.
mingwandroid commented Oct 16, 2017
Can you retry from the Anaconda Prompt ?
tacaswell commented Mar 16, 2020
- your OS
- your python version (and how you installed it)
- matplotlib version (and how you installed it)
- if you are compiling rather than getting a binary what compiler versions you are using
We do not use cython at all so there should be no pyd files involved in installing Matplotlib.
Mridhula-M commented Nov 24, 2019
import matplotlib works fine but import matplotlib.pyplot as plt throws the error.
I'm getting the error for import matplotlib as well
I tried uninstalling and reinstalling the older version but the error still remains
nzmedic commented Nov 16, 2019
Thanks @frank-wang-yifei , downgrade to 3.0.3 worked for me as well.
msarahan commented Nov 14, 2017
Nothing obviously wrong there. Did this originally work, but stopped after an update to something or an installation of something?
dpsugasa commented Sep 26, 2019
I am still getting this problem with Python 3.6.9, Windows 10 x64, and matplotlib 3.1.1. I installed Microsoft Visual C++ Redistributable manually. I also tried pip install msvc-runtime . Downgrading matplotlib also doesn't work.
Still getting this error:
ImportError: DLL load failed: The specified module could not be found.
ovm commented Nov 7, 2017 •
I have the same error. However, using a simple "import matplotlib" does not cause such error
`Python 3.6.3 |Anaconda, Inc.| (default, Oct 27 2017, 12:22:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.import matplotlib.pyplot as plt
Traceback (most recent call last):
File "", line 1, in
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\pyplot.py", line 29, in
import matplotlib.colorbar
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\colorbar.py", line 36, in
import matplotlib.contour as contour
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\contour.py", line 21, in
import matplotlib.font_manager as font_manager
File "C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\font_manager.py", line 58, in
from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
ImportError: DLL load failed: The specified procedure could not be found.`HarlowBurgess commented Mar 29, 2020
Upgrading to matplotlib 3.2.1 fixed it for me.
OS: Windows 10 Pro 1909
Python: 3.7.4 64-bit (Microsoft Visual Studio 2019 Community - Python workload)
matplotlib: 3.2.1 (PyPI)Younes-L commented Jun 17, 2019
couldn't get 3.1.0 to work using pip install this morning on a fresh python 3.7.3 install , getting the same error. Had to downgrade to 3.0.0 and it worked
This merged PR looks newer than 3.1.0 , so right now both the error and the unhelpful error message persist
msarahan commented Nov 15, 2017
Sorry, I just tried to reproduce in a win 7 VM, and things work OK for me. Here's what I did:
- Install Anaconda3-5.0.1-win64
- try the " matplotlib.pyplot as plt" command in ipython
- run conda update --all
- try the " matplotlib.pyplot as plt" command in ipython
I suspected our freetype package, but I seem to have the same one as you:
The most likely culprit here is that you have DLLs that are being loaded preferentially before Anaconda's DLLs. Those DLLs seem to be incompatible with the ones that Anaconda uses. The most common way that this happens is when other programs install things into C:\Windows\System32.
This particular one looks like freetype2. Fortunately that has few possible dependencies to find. Look for png, zlib, or freetype/ft2 DLLs.
For some reason, f2tfont.cpp does not compile when installing matplotlib (through pip ), hence, the matplotlib install fails. Also, the matplotlib installer cannot find a Python installation.
See comments here for further details on the problem.
salimg517 commented Apr 16, 2020
Same issue on my machine (Win64, Conda 4.7.12, Python 3.7.3.final.0) - import matplotlib works fine but import matplotlib.pyplot as plt throws the error.
Spent hours trying different methods found from GitHub/StackOverflow with no luck. Finally fixed the issue by downgrading to matplotlib 3.0.3 ("older stable version" as stated by the official website).
frank-yifei-wang commented Nov 6, 2019
Same issue on my machine (Win64, Conda 4.7.12, Python 3.7.3.final.0) - import matplotlib works fine but import matplotlib.pyplot as plt throws the error.
Spent hours trying different methods found from GitHub/StackOverflow with no luck. Finally fixed the issue by downgrading to matplotlib 3.0.3 ("older stable version" as stated by the official website).
Читайте также: