<p dir="auto">Traceback (most recent call last):<br>
File "C:\Users\Scott Ward-Corderoy\Desktop\python_work\Projects\Data Visualisation\generating_data.py", line 1, in <br>
import matplotlib.pyplot as plt<br>
File "C:\Users\Scott Ward-Corderoy\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\matplotlib_<em>init</em>_.py", line 174, in <br>
<em>check_versions()<br>
File "C:\Users\Scott Ward-Corderoy\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.7_qbz5n2kfra8p0\LocalCache\local-packages\Python37\site-packages\matplotlib_<em>init</em></em>.py", line 159, in _check_versions<br>
from . import ft2font<br>
ImportError: DLL load failed: The specified module could not be found.</p>
<p dir="auto">I get the above error when trying to import matplotlib. I am new to programming and am unsure what I have done wrong. Any help would be massively appreciated. I assume more information is needed but I do not know what.</p>
<p dir="auto">Thanks</p>
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">On some Windows machines (including Windows 10 and Windows 7), we experienced <code class="notranslate">ImportError: DLL load failed: The specific module could not be found</code> after upgrading from Matplotlib 3.3.0 to 3.3.1.</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<p dir="auto"><code class="notranslate">import matplotlib</code> would trigger the import error while trying to import ft2font.</p>
<p dir="auto"><strong>Actual outcome</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="In [1]: import matplotlib
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
&lt;ipython-input-1-0484cd13f94d&gt; in &lt;module&gt;
----&gt; 1 import matplotlib

c:\users\nzlab\envs\nta-1465\lib\site-packages\matplotlib\__init__.py in &lt;module&gt;
    172
    173
--&gt; 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
--&gt; 159     from . import ft2font
    160
    161     for modname, minver in [

ImportError: DLL load failed: The specified module could not be found.
"><pre class="notranslate"><span class="pl-v">In</span> [<span class="pl-c1">1</span>]: <span class="pl-s1">import</span> <span class="pl-s1">matplotlib</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span>
<span class="pl-v">ImportError</span>                               <span class="pl-v">Traceback</span> (<span class="pl-s1">most</span> <span class="pl-s1">recent</span> <span class="pl-s1">call</span> <span class="pl-s1">last</span>)
<span class="pl-c1">&lt;</span><span class="pl-s1">ipython</span><span class="pl-c1">-</span><span class="pl-s1">input</span><span class="pl-c1">-</span><span class="pl-c1">1</span><span class="pl-c1">-</span><span class="pl-c1">0484</span><span class="pl-s1">cd13f94d</span><span class="pl-c1">&gt;</span> <span class="pl-s1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">1</span> <span class="pl-s1">import</span> <span class="pl-s1">matplotlib</span>

<span class="pl-s1">c</span>:\u<span class="pl-s1">sers</span>\n<span class="pl-s1">zlab</span>\e<span class="pl-s1">nvs</span>\n<span class="pl-s1">ta</span><span class="pl-c1">-</span><span class="pl-c1">1465</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\m<span class="pl-s1">atplotlib</span>\_<span class="pl-s1">_init__</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-c1">&lt;</span><span class="pl-s1">module</span><span class="pl-c1">&gt;</span>
    <span class="pl-c1">172</span>
    <span class="pl-c1">173</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">174</span> <span class="pl-en">_check_versions</span>()
    <span class="pl-c1">175</span>
    <span class="pl-c1">176</span>

<span class="pl-s1">c</span>:\u<span class="pl-s1">sers</span>\n<span class="pl-s1">zlab</span>\e<span class="pl-s1">nvs</span>\n<span class="pl-s1">ta</span><span class="pl-c1">-</span><span class="pl-c1">1465</span>\l<span class="pl-s1">ib</span>\s<span class="pl-s1">ite</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\m<span class="pl-s1">atplotlib</span>\_<span class="pl-s1">_init__</span>.<span class="pl-s1">py</span> <span class="pl-c1">in</span> <span class="pl-en">_check_versions</span>()
    <span class="pl-c1">157</span>     <span class="pl-c"># Quickfix to ensure Microsoft Visual C++ redistributable</span>
    <span class="pl-c1">158</span>     <span class="pl-c"># DLLs are loaded before importing kiwisolver</span>
<span class="pl-c1">-</span><span class="pl-c1">-</span><span class="pl-c1">&gt;</span> <span class="pl-c1">159</span>     <span class="pl-k">from</span> . <span class="pl-k">import</span> <span class="pl-s1">ft2font</span>
    <span class="pl-c1">160</span>
    <span class="pl-c1">161</span>     <span class="pl-k">for</span> <span class="pl-s1">modname</span>, <span class="pl-s1">minver</span> <span class="pl-c1">in</span> [

<span class="pl-v">ImportError</span>: <span class="pl-v">DLL</span> <span class="pl-s1">load</span> <span class="pl-s1">failed</span>: <span class="pl-v">The</span> <span class="pl-s1">specified</span> <span class="pl-s1">module</span> <span class="pl-s1">could</span> <span class="pl-c1">not</span> <span class="pl-s1">be</span> <span class="pl-s1">found</span>.</pre></div>
<p dir="auto"><strong>Expected outcome</strong></p>


<p dir="auto">No error should be presented.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system: Windows 7 (64bit), Windows 10 (64bit)</li>
<li>Matplotlib version: 3.3.1</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>): Qt5Agg</li>
<li>Python version: Python 3.7.6</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries: Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.27.29016 <strong>NOT INSTALLED</strong></li>
</ul>


<p dir="auto">**Further diagnose shows: **</p>
<ul dir="auto">
<li>ft2font.cp37-win_amd64.pyd (Matplotlib 3.3.0) links VCRUNTIME140.dll</li>
<li>ft2font.cp37-win_amd64.pyd (Matplotlib 3.3.1) links VCRUNTIME140_1.dll</li>
</ul>
<p dir="auto">Those computers which have DLL load failed don't have VCRUNTIME140_1.dll in DLL search path.</p>
<p dir="auto"><strong>Solution</strong><br>
Installing the latest <a href="https://support.microsoft.com/en-nz/help/2977003/the-latest-supported-visual-c-downloads" rel="nofollow">Visual Studio 2015, 2019 and 2019 redistributable</a> should address the issue.</p>
<p dir="auto"><strong>Question</strong><br>
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?</p>