I've re-installed pycharm on windows, and copy the original venv folder to the new project.
python packages After indexing, the packages I once downloaded can be seen in 'Python Packages'. But in Terminal, as I run the command "pip list", there's nothing which contradicts my expectation of seeing a huge list of package names.
and when I run the simple program print(np.array([1, 2, 3, 4, 5]))
I got the following error:
from numpy.core._multiarray_umath import ( ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'
During handling of the above exception, another exception occurred: 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.11 from "E:\Users\complicated_path\my_project\venv\Scripts\python.exe"
- The NumPy version is: "1.26.0"
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'
The above exception was the direct cause of the following exception: ImportError: Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch your python interpreter from there.
But my script ( the .py python file) is not in the venv folder but in the parallel folder under the project. Really mad at this, or if someone can help re-download the whole bunch of packages will also be fine.