0

我尝试 在 Windows 子系统 Linux 20.04 中pythran基于https://pythran.readthedocs.io/en/latest/https://medium.com/@olivier.borderies/pythran-python-at-c-speed-518f26af60e8安装LTS

然后它触发了我的一些问题numpy(可能不是来自conda安装)也就是说,如果我import numpypython,它告诉我

>>> 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

我尝试升级我的numpy,通过修复选项重新安装一个 api python,安装最新的 intel-python,l_AIkit...,在我的中重置 PATHONPATH .bashrc,例如,

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

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

这些尝试都不起作用。python似乎我在and之间遇到了一些复杂的冲突numpy。我有一些conda环境仍然可以在几个应用程序中工作,但我想修复主要的环境(仍然不习惯conda)。

我搜索了这种类型的错误消息。还没有找到有用的解决方案:(

4

0 回答 0