title: numpy is already installed with Anaconda but I get an ImportError (DLL load failed: The specified module could not be found)
body: <p>I am using the Anaconda distribution with Python 3.7. Among the packages installed, I have numpy, pandas, etc.
  In PyCharm IDE, I have set the Project Interpreter to be the path to the python.exe installed with Anaconda:
  C:\Users\my_user_name\AppData\Local\Continuum\anaconda3\python.exe</p>
  <p>However, when I try running a simple python script:</p>
  <pre><code>import numpy as np
  print(np.pi)
  </code></pre>
  <p>I get an error:</p>
  <pre><code>ImportError: 
  Importing the multiarray numpy extension module failed.  Most
  likely you are trying to import a failed build of numpy.
  If you're working with a numpy git repo, try `git clean -xdf` (removes all
  files not under version control).  Otherwise reinstall numpy.
  
  Original error was: DLL load failed: The specified module could not be found.
  
  See the full error message below:
  
  ----------------------------------------------------------------------------------
  Traceback (most recent call last):
    File &quot;C:\Users\my_user_name\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\__init__.py&quot;, line 16, in &lt;module&gt;
      from . import multiarray
  ImportError: DLL load failed: The specified module could not be found.
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;C:/Users/my_user_name/Documents/TestMyApps/simpletest.py&quot;, line 1, in &lt;module&gt;
      import numpy as np
    File &quot;C:\Users\my_user_name\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\__init__.py&quot;, line 142, in &lt;module&gt;
      from . import add_newdocs
    File &quot;C:\Users\my_user_name\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\add_newdocs.py&quot;, line 13, in &lt;module&gt;
      from numpy.lib import add_newdoc
    File &quot;C:\Users\my_user_name\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\lib\__init__.py&quot;, line 8, in &lt;module&gt;
      from .type_check import *
    File &quot;C:\Users\my_user_name\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\lib\type_check.py&quot;, line 11, in &lt;module&gt;
      import numpy.core.numeric as _nx
    File &quot;C:\Users\my_user_name\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\core\__init__.py&quot;, line 26, in &lt;module&gt;
      raise ImportError(msg)
  ImportError: 
  Importing the multiarray numpy extension module failed.  Most
  likely you are trying to import a failed build of numpy.
  If you're working with a numpy git repo, try `git clean -xdf` (removes all
  files not under version control).  Otherwise reinstall numpy.
  
  Original error was: DLL load failed: The specified module could not be found.
  
  
  Process finished with exit code 1
  
  ----------------------------------------------------------------------------------
  </code></pre>
  <p>I have tried uninstalling and reinstalling numpy using Anaconda Prompt with:
  conda uninstall numpy, and then: conda install numpy [I now have numpy 1.15.4].
  The re-install seem 'successful' (at least according to Anaconda Prompt), but, I keep getting an error in PyCharm.</p>
  <p>The strange part, is when I directly go into Anaconda Prompt, and type:</p>
  <pre><code>python
  import numpy as np
  print(np.pi)
  </code></pre>
  <p>I do not get any error, and I am able to see the <a href="https://imgur.com/a/Z6qHBIY" rel="noreferrer">correct result printed out</a>.
  At first, I thought that perhaps, when using PyCharm, I am somehow pointing to a different executable, but I checked in both Anaconda Prompt and Python Console of Pycharm, using:</p>
  <pre><code>sys.executable
  </code></pre>
  <p>and they both show the same path:</p>
  <pre><code>'C:\\Users\\my_user_name\\AppData\\Local\\Continuum\\anaconda3\\python.exe'
  </code></pre>
  <p>Note that in PyCharm, when I try running a script where I am not importing any library, or when the library imported are just like sys or os, the scripts run fine. However, when I try running any other script that involves importing a library that somehow depends on numpy, it fails as well (i.e. scripts where I import pandas, etc.)
  Those same scripts work fine in Anaconda Prompt.</p>
  <p>I am at a loss here, any help would be very appreciated!</p>