I am using the reticulate package in R to take advantage of certain Python packages. However, when I try and import numpy, it gives the following error:
Error: ImportError: Unable to import required dependencies:
numpy: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.htmlPlease note and check the following:
- The Python version is: Python3.10 from “/data/user/home/yongw/.conda/envs/anndata/bin/python”
- The NumPy version is: “1.20.3”
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’
Even installing a new version of numpy into my Anaconda environment doesn’t fix the error, the same numpy version is being used. How can I fix this?