Bug report
Bug summary
Attempting to IMPORT matplotlib under Python 3.7.x on a Win10Pro results in error: "ImportError: DLL load failed: The specific module could not be found".
DLL name not given.
However, first importing PyQt5, and only then importing matplotlib works as it should.
Code for reproduction
- install Python 3.7.x (tested both 3.7.2 and 3.7.3) on Win10Pro
- install matplotlib (version 3.1.0) with pip - installs fine, no issues
- install PyQt5 (version 5.12.2) with pip - installs fine, no issues
- start Python
- under Python, enter command: "import matplotlib"
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\Python37\lib\site-packages\matplotlib\__init__.py", line 200, in <module>
_check_versions()
File "C:\Program Files\Python37\lib\site-packages\matplotlib\__init__.py", line 194, in _check_versions
module = importlib.import_module(modname)
File "C:\Program Files\Python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: DLL load failed: The specified module could not be found.
>>>
>>>
# importing matplotlib works fine when PyQt5 imported first
>>> import PyQt5
>>> import matplotlib
>>> import serial
>>>
>>> ^Z
Actual outcome
Expected outcome
using matplotlib should not depend on importing PyQt5 first; but when done, code works fine
Matplotlib version
- Operating system: Win10Pro
- Matplotlib version: 3.1.0
- Matplotlib backend (
print(matplotlib.get_backend())): TkAgg right after importing; in the full code using qt5agg
- Python version: 3.7.2, 3.7.3, 64 bit
- Jupyter version (if applicable): n.a.
- Other libraries:
Python installed from Win installer
matplotlib and PyQt5 installed with pip
Bug report
Bug summary
Attempting to IMPORT matplotlib under Python 3.7.x on a Win10Pro results in error: "ImportError: DLL load failed: The specific module could not be found".
DLL name not given.
However, first importing PyQt5, and only then importing matplotlib works as it should.
Code for reproduction
Actual outcome
Expected outcome
using matplotlib should not depend on importing PyQt5 first; but when done, code works fine
Matplotlib version
print(matplotlib.get_backend())): TkAgg right after importing; in the full code using qt5aggPython installed from Win installer
matplotlib and PyQt5 installed with pip