Python Forum
not able to import numpy in pthon_d
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
not able to import numpy in pthon_d
#1
Hello,

I am trying to import numpy libary using the python_d.exe but get import error. Please see below:
:\numpy>python_d
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:58:56) [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:\numpy\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:\numpy\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\numpy\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\numpy\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\numpy\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\numpy\numpy\core\__init__.py", line 26, in <module>
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: cannot import name 'multiarray'


I tried to build a debug verion but also get error wen building numpy array from source:

:\numpy>python_d runtests.py --ipython
Building, see build.log...
... build in progress
Build OK
Enabling display of all warnings and pre-importing numpy as np
C:\Python\Python36\lib\site-packages\IPython\lib\pretty.py:91: DeprecationWarning: IPython.utils.signatures backport for Python 2 is deprecated in IPython 6, which only supports Python 3
from IPython.utils.signatures import signature
C:\Python\Python36\lib\site-packages\IPython\utils\module_paths.py:28: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import imp
Traceback (most recent call last):
File "C:\numpy\build\testenv\Lib\site-packages\numpy\core\__init__.py", line 16, in <module>
from . import multiarray
ImportError: Module use of python36.dll conflicts with this version of Python.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "runtests.py", line 466, in <module>
main(argv=sys.argv[1:])
File "runtests.py", line 188, in main
import numpy as np
File "C:\numpy\build\testenv\Lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File "C:\numpy\build\testenv\Lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\numpy\build\testenv\Lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File "C:\numpy\build\testenv\Lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "C:\numpy\build\testenv\Lib\site-packages\numpy\core\__init__.py", line 26, in <module>
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: Module use of python36.dll conflicts with this version of Python.

Your advice is very much appreciated. Thanks in advance.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Numpy] How to store different data type in one numpy array? water 7 543 Mar-26-2024, 02:18 PM
Last Post: snippsat
  Numpy returns "TypeError: unsupported operand type(s) for *: 'numpy.ufunc' and 'int'" kalle 2 2,602 Jul-19-2022, 06:31 AM
Last Post: paul18fr
  import numpy problem ptnb 1 2,107 May-18-2020, 06:03 PM
Last Post: ptnb
  import numpy in sub-files paul18fr 1 2,012 Aug-06-2019, 12:38 PM
Last Post: chakrimakam
  "erlarge" a numpy-matrix to numpy-array PhysChem 2 2,976 Apr-09-2019, 04:54 PM
Last Post: PhysChem
  ImportError: numpy.core.multiarray failed to import Nimya 3 20,587 Jun-12-2018, 02:32 PM
Last Post: volcano63

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020