0

{"error": "ImportError('\n\nIMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!\n\nImporting the numpy C-extensions failed. This error can happen for\nmany reasons, often due to issues with your setup or how NumPy was\ninstalled.\n\nWe have compiled some common reasons and troubleshooting tips at:\n\n
https://numpy.org/devdocs/user/troubleshooting-importerror.html\\n\\nPlease note and check the following:\n\n * The Python version is: Python3.9 from "/var/lang/bin/python3"\n * The NumPy version is: "1.24.1"\n\nand make sure that they are the versions you expect.\nPlease carefully study the documentation linked above for further help.\n\nOriginal error was: No module named \'numpy.core._multiarray_umath\'\n')"}

I have installed numpy by the this command pip3 install numpy --target .

I have tried changing numpy and python versions, but same issue exits for me

FObersteiner
  • 22,500
  • 8
  • 42
  • 72
Mahesh A
  • 1
  • 1

1 Answers1

-1

Start using virtual environments (https://realpython.com/python-virtual-environments-a-primer/)

Clean your system Python

$ pip freeze > foo.txt
$ pip uninstall -rf foo.txt
$ rm foo.txt

Set up the virtual environment

$ python -m venv venv
$ source venv/bin/activate
$ pip install numpy

Import numpy

$ python

>> import numpy
chc
  • 498
  • 1
  • 4
  • 18