Import Error help me!

0 views
Skip to first unread message

Weisong Zhou

unread,
Nov 13, 2017, 8:52:06 PM11/13/17
to Anaconda - Public
I download the Anaconda3-5.0.1-Windows-x86_64.exe and my pc installed win10 64-bit

I just type import numpy as np, but it doesn't work.

ImportError
Traceback (most recent call last) ~\AppData\Roaming\Python\Python36\site-packages\numpy\core\__init__.py in <module>() 15 try: ---> 16 from . import multiarray 17 except ImportError as exc: ImportError: cannot import name 'multiarray' During handling of the above exception, another exception occurred: ImportError Traceback (most recent call last) <ipython-input-1-4ee716103900> in <module>() ----> 1 import numpy as np ~\AppData\Roaming\Python\Python36\site-packages\numpy\__init__.py in <module>() 140 return loader(*packages, **options) 141 --> 142 from . import add_newdocs 143 __all__ = ['add_newdocs', 144 'ModuleDeprecationWarning', ~\AppData\Roaming\Python\Python36\site-packages\numpy\add_newdocs.py in <module>() 11 from __future__ import division, absolute_import, print_function 12 ---> 13 from numpy.lib import add_newdoc 14 15 ############################################################################### ~\AppData\Roaming\Python\Python36\site-packages\numpy\lib\__init__.py in <module>() 6 from numpy.version import version as __version__ 7 ----> 8 from .type_check import * 9 from .index_tricks import * 10 from .function_base import * ~\AppData\Roaming\Python\Python36\site-packages\numpy\lib\type_check.py in <module>() 9 'common_type'] 10 ---> 11 import numpy.core.numeric as _nx 12 from numpy.core.numeric import asarray, asanyarray, array, isnan, zeros 13 from .ufunclike import isneginf, isposinf ~\AppData\Roaming\Python\Python36\site-packages\numpy\core\__init__.py in <module>() 24 Original error was: %s 25 """ % (exc,) ---> 26 raise ImportError(msg) 27 28 for envkey in env_added: 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: cannot import name 'multiarray'

Will Warner

unread,
Nov 14, 2017, 3:47:49 PM11/14/17
to Anaconda - Public
What output do you see if you open the Anaconda prompt from the Start menu and then run these commands?

conda update numpy
python
import numpy as np

kunalr...@gmail.com

unread,
Jun 23, 2018, 5:58:55 AM6/23/18
to Anaconda - Public
I got the same error 


(base) C:\Users\CR>conda update numpy
Solving environment: done
# All requested packages already installed.

(base) C:\Users\CR>python
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
Traceback (most recent call last):
  File "C:\Users\CR\AppData\Roaming\Python\Python36\site-packages\numpy\core\__init__.py", line 16, in <module>
    from . import multiarray

ImportError: cannot import name 'multiarray'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\CR\AppData\Roaming\Python\Python36\site-packages\numpy\__init__.py", line 142, in <module>
    from . import add_newdocs
  File "C:\Users\CR\AppData\Roaming\Python\Python36\site-packages\numpy\add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "C:\Users\CR\AppData\Roaming\Python\Python36\site-packages\numpy\lib\__init__.py", line 8, in <module>
    from .type_check import *
  File "C:\Users\CR\AppData\Roaming\Python\Python36\site-packages\numpy\lib\type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "C:\Users\CR\AppData\Roaming\Python\Python36\site-packages\numpy\core\__init__.py", line 26, in <module>
    raise ImportError(msg)

Will Warner

unread,
Jun 25, 2018, 2:14:02 PM6/25/18
to Anaconda - Public
It looks like this may be caused by a bad interaction between NumPy and the Intel MKL libraries. Would you please file an Anaconda bug report here? https://github.com/ContinuumIO/anaconda-issues/issues

Searching on Google for [numpy multiarray] turned up discussions of similar problems, including https://github.com/numpy/numpy/issues/9272 and some items in the anaconda-issues repository.

Kunal Rai

unread,
Jun 26, 2018, 8:04:06 PM6/26/18
to anac...@continuum.io
Hi Team,

I resolved the issue with the below steps:
1. My local numpy version was 1.4.5 but anaconda version was 1.4.0. 
2. I tryed "conda install numpy=1.4.5" - but because of previous traces it did not work.
3. I uninstalledmy local numpy (Important step)
4. Uninstalled and deleted the entire anaconda folder.(Important step)
5. Reinstalled anaconda = Everything worked fine

Thanks,
Kunal

--
Community Discussion Forum for Anaconda
---
You received this message because you are subscribed to a topic in the Google Groups "Anaconda - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/anaconda/dcAjQwbMc0U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to anaconda+u...@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.
Reply all
Reply to author
Forward
0 new messages