Revision history [back]
Anaconda cannot import modules such as numpy
This is a common problem we've been seeing so I'm adding it here as a question. Anaconda may fail to import modules like numpy with errors such as this:
import numpy
Traceback (most recent call last):
Python Shell, prompt 1, line 1
# Used internally for debug sandbox under external interpreter
File "c:\Users\ylem\AppData\Local\Continuum\anaconda3\Lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "c:\Users\ylem\AppData\Local\Continuum\anaconda3\Lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "c:\Users\ylem\AppData\Local\Continuum\anaconda3\Lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "c:\Users\ylem\AppData\Local\Continuum\anaconda3\Lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "c:\Users\ylem\AppData\Local\Continuum\anaconda3\Lib\site-packages\numpy\core\__init__.py", line 29, in <module>
raise ImportError(msg)
builtins.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.