title: Import matplotlib's pyplot fails on visual studio code with anaconda
body: <p>I'm using anaconda as my python package manager and Visual Studio Code as my python IDE.</p>
  
  <p>While I'm able to see and select the virtual environment from VS code, I'm unable to load <code>matplotlib.pyplot</code> when executing from VS code.</p>
  
  <p>I created a <code>test</code> virtual environment and installed matplotlib with <code>conda install matplotlib</code>. 
  I have explicitly selected this conda <code>test</code> environment as my Python interpreter in VS Code as shown in this screenshot : 
  <a href="https://i.stack.imgur.com/HNxsS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HNxsS.png" alt="Screenshot"></a></p>
  
  <p>Running this python file from VS code :</p>
  
  <pre><code>import matplotlib.pyplot as plt
  print("Hello world")
  </code></pre>
  
  <p>Fails with the following error :</p>
  
  <pre><code>PS Q:\Code\Tests&gt; &amp; 'C:\Users\louen\.conda\envs\test\python.exe' 'c:\Users\louen\.vscode\extensions\ms-python.python-2019.8.30787\pythonFiles\ptvsd_launcher.py' '--default' '--client' '--host' 'localhost' '--port' '50055' 'q:\Code\Tests\hello.py'
  Traceback (most recent call last):
    File "c:\Users\louen\.vscode\extensions\ms-python.python-2019.8.30787\pythonFiles\ptvsd_launcher.py", line 43, in &lt;module&gt;
      main(ptvsdArgs)
    File "c:\Users\louen\.vscode\extensions\ms-python.python-2019.8.30787\pythonFiles\lib\python\ptvsd\__main__.py", line 432, in main
      run()
    File "c:\Users\louen\.vscode\extensions\ms-python.python-2019.8.30787\pythonFiles\lib\python\ptvsd\__main__.py", line 316, in run_file
      runpy.run_path(target, run_name='__main__')
    File "C:\Users\louen\.conda\envs\test\lib\runpy.py", line 263, in run_path
      pkg_name=pkg_name, script_name=fname)
    File "C:\Users\louen\.conda\envs\test\lib\runpy.py", line 96, in _run_module_code
      mod_name, mod_spec, pkg_name, script_name)
    File "C:\Users\louen\.conda\envs\test\lib\runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "q:\Code\Tests\hello.py", line 1, in &lt;module&gt;
      import matplotlib.pyplot as plt
    File "C:\Users\louen\.conda\envs\test\lib\site-packages\matplotlib\pyplot.py", line 32, in &lt;module&gt;
      import matplotlib.colorbar
    File "C:\Users\louen\.conda\envs\test\lib\site-packages\matplotlib\colorbar.py", line 31, in &lt;module&gt;
      import matplotlib.contour as contour
    File "C:\Users\louen\.conda\envs\test\lib\site-packages\matplotlib\contour.py", line 16, in &lt;module&gt;
      import matplotlib.font_manager as font_manager
    File "C:\Users\louen\.conda\envs\test\lib\site-packages\matplotlib\font_manager.py", line 40, in &lt;module&gt;
      from matplotlib import afm, cbook, ft2font, rcParams
  ImportError: DLL load failed: The specified module could not be found.
  </code></pre>
  
  <p>However, running the same file from the anaconda command prompt works:</p>
  
  <pre><code>(test) C:\Users\louen&gt;python Q:\Code\Tests\hello.py
  Hello World
  </code></pre>
  
  <p>Also, importing only <code>matplotlib</code> does not trigger the error either.</p>
  
  <p>Here is the output from <code>conda info</code></p>
  
  <pre><code>(test) C:\Users\louen&gt;conda info
  
       active environment : test
      active env location : C:\Users\louen\.conda\envs\test
              shell level : 3
         user config file : C:\Users\louen\.condarc
   populated config files :
            conda version : 4.6.14
      conda-build version : 3.10.5
           python version : 3.6.5.final.0
         base environment : C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64  (read only)
             channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                            https://repo.anaconda.com/pkgs/main/noarch
                            https://repo.anaconda.com/pkgs/free/win-64
                            https://repo.anaconda.com/pkgs/free/noarch
                            https://repo.anaconda.com/pkgs/r/win-64
                            https://repo.anaconda.com/pkgs/r/noarch
                            https://repo.anaconda.com/pkgs/msys2/win-64
                            https://repo.anaconda.com/pkgs/msys2/noarch
            package cache : C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\pkgs
                            C:\Users\louen\.conda\pkgs
                            C:\Users\louen\AppData\Local\conda\conda\pkgs
         envs directories : C:\Users\louen\.conda\envs
                            C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64\envs
                            C:\Users\louen\AppData\Local\conda\conda\envs
                 platform : win-64
               user-agent : conda/4.6.14 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.17134
            administrator : False
               netrc file : None
             offline mode : False
  </code></pre>
  
  <p>Where does this error comes from ? Is there a difference between the VS code execution environment and the conda environment ? </p>