Description
Bug report
Bug summary
On some Windows machines (including Windows 10 and Windows 7), we experienced ImportError: DLL load failed: The specific module could not be found
after upgrading from Matplotlib 3.3.0 to 3.3.1.
Code for reproduction
import matplotlib
would trigger the import error while trying to import ft2font.
Actual outcome
In [1]: import matplotlib
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-0484cd13f94d> in <module>
----> 1 import matplotlib
c:\users\nzlab\envs\nta-1465\lib\site-packages\matplotlib\__init__.py in <module>
172
173
--> 174 _check_versions()
175
176
c:\users\nzlab\envs\nta-1465\lib\site-packages\matplotlib\__init__.py in _check_versions()
157 # Quickfix to ensure Microsoft Visual C++ redistributable
158 # DLLs are loaded before importing kiwisolver
--> 159 from . import ft2font
160
161 for modname, minver in [
ImportError: DLL load failed: The specified module could not be found.
Expected outcome
No error should be presented.
Matplotlib version
- Operating system: Windows 7 (64bit), Windows 10 (64bit)
- Matplotlib version: 3.3.1
- Matplotlib backend (
print(matplotlib.get_backend())
): Qt5Agg - Python version: Python 3.7.6
- Jupyter version (if applicable):
- Other libraries: Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.27.29016 NOT INSTALLED
**Further diagnose shows: **
- ft2font.cp37-win_amd64.pyd (Matplotlib 3.3.0) links VCRUNTIME140.dll
- ft2font.cp37-win_amd64.pyd (Matplotlib 3.3.1) links VCRUNTIME140_1.dll
Those computers which have DLL load failed don't have VCRUNTIME140_1.dll in DLL search path.
Solution
Installing the latest Visual Studio 2015, 2019 and 2019 redistributable should address the issue.
Question
Is changing in VC++ API (from 14 to 14.1) an intentional move on Matplotlib 3.3.1 for Windows release? If so, should the VC++ dependency to be added to Installation Guide?