<p dir="auto">Hello,</p>
<p dir="auto">I'm trying to run the CNTK tutorial notebook: CNTK_101_LogisticRegression.<br>
I cannot import matplotlib.pyplot</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="(base) C:\CNTK-Samples-2-3-1\Tutorials&gt;python
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] on win32
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; import matplotlib
&gt;&gt;&gt; import matplotlib.pyplot as plt
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\pyplot.py&quot;, line 32, in &lt;module&gt;
    import matplotlib.colorbar
  File &quot;C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\colorbar.py&quot;, line 36, in &lt;module&gt;
    import matplotlib.contour as contour
  File &quot;C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\contour.py&quot;, line 21, in &lt;module&gt;
    import matplotlib.font_manager as font_manager
  File &quot;C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\font_manager.py&quot;, line 58, in &lt;module&gt;
    from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
ImportError: DLL load failed: The specified procedure could not be found.
&gt;&gt;&gt; quit()

(base) C:\CNTK-Samples-2-3-1\Tutorials&gt;conda install matplotlib
Solving environment: done

# All requested packages already installed.

(base) C:\CNTK-Samples-2-3-1\Tutorials&gt;python
Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 15 2017, 03:27:45) [MSC v.1900 64 bit (AMD64)] on win32
Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
&gt;&gt;&gt; import matplotlib.pyplot as plt
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
  File &quot;C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\pyplot.py&quot;, line 32, in &lt;module&gt;
    import matplotlib.colorbar
  File &quot;C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\colorbar.py&quot;, line 36, in &lt;module&gt;
    import matplotlib.contour as contour
  File &quot;C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\contour.py&quot;, line 21, in &lt;module&gt;
    import matplotlib.font_manager as font_manager
  File &quot;C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\font_manager.py&quot;, line 58, in &lt;module&gt;
    from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
ImportError: DLL load failed: The specified procedure could not be found.

&gt;&gt;&gt; import matplotlib
&gt;&gt;&gt; matplotlib.__file__
'C:\\Users\\Charles\\Anaconda3\\lib\\site-packages\\matplotlib\\__init__.py'
&gt;&gt;&gt; print(matplotlib.__version__)
2.1.1
"><pre class="notranslate">(<span class="pl-s1">base</span>) <span class="pl-v">C</span>:\C<span class="pl-v">NTK</span><span class="pl-c1">-</span><span class="pl-v">Samples</span><span class="pl-c1">-</span><span class="pl-c1">2</span><span class="pl-c1">-</span><span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-c1">1</span>\T<span class="pl-s1">utorials</span><span class="pl-c1">&gt;</span><span class="pl-s1">python</span>
<span class="pl-v">Python</span> <span class="pl-c1">3.6</span><span class="pl-c1">.3</span> <span class="pl-c1">|</span><span class="pl-v">Anaconda</span> <span class="pl-s1">custom</span> (<span class="pl-c1">64</span><span class="pl-c1">-</span><span class="pl-s1">bit</span>)<span class="pl-c1">|</span> (<span class="pl-s1">default</span>, <span class="pl-v">Oct</span> <span class="pl-c1">15</span> <span class="pl-c1">2017</span>, <span class="pl-c1">03</span>:<span class="pl-c1">27</span>:<span class="pl-c1">45</span>) [<span class="pl-v">MSC</span> <span class="pl-s1">v</span><span class="pl-c1">.1900</span> <span class="pl-c1">64</span> <span class="pl-en">bit</span> (<span class="pl-v">AMD64</span>)] <span class="pl-s1">on</span> <span class="pl-s1">win32</span>
<span class="pl-v">Type</span> <span class="pl-s">"help"</span>, <span class="pl-s">"copyright"</span>, <span class="pl-s">"credits"</span> <span class="pl-c1">or</span> <span class="pl-s">"license"</span> <span class="pl-k">for</span> <span class="pl-s1">more</span> <span class="pl-s1">information</span>.
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</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-v">File</span> <span class="pl-s">"&lt;stdin&gt;"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</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-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\pyplot.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">32</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-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">colorbar</span>
  <span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\colorbar.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">36</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-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">contour</span> <span class="pl-k">as</span> <span class="pl-s1">contour</span>
  <span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\contour.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">21</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-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">font_manager</span> <span class="pl-k">as</span> <span class="pl-s1">font_manager</span>
  <span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib<span class="pl-cce">\f</span>ont_manager.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">58</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-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-s1">import</span> <span class="pl-s1">afm</span>, <span class="pl-s1">cbook</span>, <span class="pl-s1">ft2font</span>, <span class="pl-s1">rcParams</span>, <span class="pl-s1">get_cachedir</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">procedure</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>.
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">quit</span>()

(<span class="pl-s1">base</span>) <span class="pl-v">C</span>:\C<span class="pl-v">NTK</span><span class="pl-c1">-</span><span class="pl-v">Samples</span><span class="pl-c1">-</span><span class="pl-c1">2</span><span class="pl-c1">-</span><span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-c1">1</span>\T<span class="pl-s1">utorials</span><span class="pl-c1">&gt;</span><span class="pl-s1">conda</span> <span class="pl-s1">install</span> <span class="pl-s1">matplotlib</span>
<span class="pl-v">Solving</span> <span class="pl-s1">environment</span>: <span class="pl-en">done</span>

<span class="pl-c"># All requested packages already installed.</span>

(<span class="pl-s1">base</span>) <span class="pl-v">C</span>:\C<span class="pl-v">NTK</span><span class="pl-c1">-</span><span class="pl-v">Samples</span><span class="pl-c1">-</span><span class="pl-c1">2</span><span class="pl-c1">-</span><span class="pl-c1">3</span><span class="pl-c1">-</span><span class="pl-c1">1</span>\T<span class="pl-s1">utorials</span><span class="pl-c1">&gt;</span><span class="pl-s1">python</span>
<span class="pl-v">Python</span> <span class="pl-c1">3.6</span>.<span class="pl-c1">3</span> <span class="pl-c1">|</span><span class="pl-v">Anaconda</span> <span class="pl-s1">custom</span> (<span class="pl-c1">64</span><span class="pl-c1">-</span><span class="pl-s1">bit</span>)<span class="pl-c1">|</span> (<span class="pl-s1">default</span>, <span class="pl-v">Oct</span> <span class="pl-c1">15</span> <span class="pl-c1">2017</span>, <span class="pl-c1">03</span>:<span class="pl-c1">27</span>:<span class="pl-c1">45</span>) [<span class="pl-v">MSC</span> <span class="pl-s1">v</span><span class="pl-c1">.1900</span> <span class="pl-c1">64</span> <span class="pl-en">bit</span> (<span class="pl-v">AMD64</span>)] <span class="pl-s1">on</span> <span class="pl-s1">win32</span>
<span class="pl-v">Type</span> <span class="pl-s">"help"</span>, <span class="pl-s">"copyright"</span>, <span class="pl-s">"credits"</span> <span class="pl-c1">or</span> <span class="pl-s">"license"</span> <span class="pl-k">for</span> <span class="pl-s1">more</span> <span class="pl-s1">information</span>.
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</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-v">File</span> <span class="pl-s">"&lt;stdin&gt;"</span>, <span class="pl-s1">line</span> <span class="pl-c1">1</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-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\pyplot.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">32</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-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">colorbar</span>
  <span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\colorbar.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">36</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-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">contour</span> <span class="pl-k">as</span> <span class="pl-s1">contour</span>
  <span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib\contour.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">21</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-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">font_manager</span> <span class="pl-k">as</span> <span class="pl-s1">font_manager</span>
  <span class="pl-v">File</span> <span class="pl-s">"C:\Users\Charles\Anaconda3\lib\site-packages\matplotlib<span class="pl-cce">\f</span>ont_manager.py"</span>, <span class="pl-s1">line</span> <span class="pl-c1">58</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-k">from</span> <span class="pl-s1">matplotlib</span> <span class="pl-s1">import</span> <span class="pl-s1">afm</span>, <span class="pl-s1">cbook</span>, <span class="pl-s1">ft2font</span>, <span class="pl-s1">rcParams</span>, <span class="pl-s1">get_cachedir</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">procedure</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>.

<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">__file__</span>
'<span class="pl-v">C</span>:\\<span class="pl-v">Users</span>\\<span class="pl-v">Charles</span>\\<span class="pl-v">Anaconda3</span>\\<span class="pl-s1">lib</span>\\<span class="pl-s1">site</span><span class="pl-c1">-</span><span class="pl-s1">packages</span>\\<span class="pl-s1">matplotlib</span>\\<span class="pl-s1">__init__</span>.<span class="pl-s1">py</span>'
<span class="pl-c1">&gt;&gt;</span><span class="pl-c1">&gt;</span> <span class="pl-en">print</span>(<span class="pl-s1">matplotlib</span>.<span class="pl-s1">__version__</span>)
<span class="pl-c1">2.1</span><span class="pl-c1">.1</span></pre></div>
<p dir="auto">Any help will be greatly appreciated.</p>
<p dir="auto">Charles</p>
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">Can't import matplotlib.pyplot</p>
<p dir="auto"><strong>Code for reproduction</strong></p>

<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span></pre></div>
<p dir="auto"><strong>Actual outcome</strong></p>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="# If applicable, paste the console output here
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
&lt;ipython-input-1-f09a4c6b4388&gt; in &lt;module&gt;()
      1 import numpy as np
----&gt; 2 import matplotlib.pyplot as plt
      3 import scipy.ndimage.imread as imread
      4 
      5 path = 'C:/data/cifar_10/train/15.png'

C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\pyplot.py in &lt;module&gt;()
     30 from cycler import cycler
     31 import matplotlib
---&gt; 32 import matplotlib.colorbar
     33 from matplotlib import style
     34 from matplotlib import _pylab_helpers, interactive

C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\colorbar.py in &lt;module&gt;()
     34 import matplotlib.collections as collections
     35 import matplotlib.colors as colors
---&gt; 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 &lt;module&gt;()
     19 import matplotlib.colors as colors
     20 import matplotlib.collections as mcoll
---&gt; 21 import matplotlib.font_manager as font_manager
     22 import matplotlib.text as text
     23 import matplotlib.cbook as cbook

C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\font_manager.py in &lt;module&gt;()
     56 
     57 import matplotlib
---&gt; 58 from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
     59 from matplotlib.compat import subprocess
     60 from matplotlib.fontconfig_pattern import (

ImportError: DLL load failed: The specified procedure could not be found."><pre class="notranslate"><code class="notranslate"># If applicable, paste the console output here
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
&lt;ipython-input-1-f09a4c6b4388&gt; in &lt;module&gt;()
      1 import numpy as np
----&gt; 2 import matplotlib.pyplot as plt
      3 import scipy.ndimage.imread as imread
      4 
      5 path = 'C:/data/cifar_10/train/15.png'

C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\pyplot.py in &lt;module&gt;()
     30 from cycler import cycler
     31 import matplotlib
---&gt; 32 import matplotlib.colorbar
     33 from matplotlib import style
     34 from matplotlib import _pylab_helpers, interactive

C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\colorbar.py in &lt;module&gt;()
     34 import matplotlib.collections as collections
     35 import matplotlib.colors as colors
---&gt; 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 &lt;module&gt;()
     19 import matplotlib.colors as colors
     20 import matplotlib.collections as mcoll
---&gt; 21 import matplotlib.font_manager as font_manager
     22 import matplotlib.text as text
     23 import matplotlib.cbook as cbook

C:\ProgramData\Anaconda3\lib\site-packages\matplotlib\font_manager.py in &lt;module&gt;()
     56 
     57 import matplotlib
---&gt; 58 from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
     59 from matplotlib.compat import subprocess
     60 from matplotlib.fontconfig_pattern import (

ImportError: DLL load failed: The specified procedure could not be found.
</code></pre></div>
<p dir="auto"><strong>Expected outcome</strong></p>


<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system:</li>
<li>Matplotlib version:</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>):</li>
<li>Python version:</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries:</li>
</ul>


<p dir="auto">Everything was installed via anaconda.</p>