Intel® Distribution for Python*
Engage in discussions with community peers related to Python* applications and core computational packages.
428 Discussions

Original error was: No module named 'numpy.core._multiarray_umath' after installed pythran

AlphaF20
New Contributor I
11,428 Views

I am not sure if this question would fit stackoverflow better, and if you need any additional information, please let me know.

 

I tried to install `pythran` based on https://pythran.readthedocs.io/en/latest/ and https://medium.com/@olivier.borderies/pythran-python-at-c-speed-518f26af60e8
in windows subsystem Linux 20.04 LTS

Then it triggers some issue with my `numpy` (presumably not from the `conda` installation)
Namely, if I `import numpy` in `python`, it tells me

```
>>> import numpy
Traceback (most recent call last):
File "/home/user/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/__init__.py", line 22, in <module>
from . import multiarray
File "/home/user/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/multiarray.py", line 12, in <module>
from . import overrides
File "/home/user/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/__init__.py", line 150, in <module>
from . import core
File "/home/user/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/numpy/core/__init__.py", line 48, in <module>
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

* The Python version is: Python3.7 from "/home/user/intel/oneapi/intelpython/latest/bin/python"
* The NumPy version is: "1.21.5"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named 'numpy.core._multiarray_umath

```

I tried to upgrade my `numpy`, reinstall one api python by the repair option, install the newest intel-python, l_AIkit..., reset PATHONPATH in my `.bashrc`, e.g.,

```
#export PYTHONPATH=/home/user/intel/oneapi/intelpython/latest/lib/python3.7/site-packages/:$PYTHONPATH

export PYTHONPATH="/home/user/intel/oneapi/"
```

none of these attempts works. Seems I got some complicated confliction between `python` and `numpy`. I have some `conda` environment that can still work in a couple of applications, but I would like to fix the main one (not getting used to `conda` still).

I searched for this type of error message. Have not found a useful solution

 

 

0 Kudos
4 Replies
RahulU_Intel
Moderator
11,408 Views

Hi,

 

We are investigating your issue at our end.. We will get back to you soon with an update.

 

Thanks

Rahul

 

0 Kudos
RahulU_Intel
Moderator
11,353 Views

Hi,


We looked into your case. We were not able to reproduce your issue at our side. Could you please try removing all the installations and try to install them in a new environment using the below commands.

  1. For installing Numpy - pip install numpy
  2. For installing pythran - pip install pythran

Could you please also confirm that you are using same package manager to install both the packages.


Hope this helps.


Thanks and Regards

Rahul


0 Kudos
RahulU_Intel
Moderator
11,303 Views

Hi,


We haven't heard back from you. Could you please confirm if your issue is resolved.


Thanks and Regards

Rahul


0 Kudos
RahulU_Intel
Moderator
11,232 Views

Hi,


We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question


Thanks

Rahul

.



0 Kudos
Reply