Error:
I have already installed numpy module(
pip show numpy
):
this how it shows when i try to install numpy again
I tried to import numpy module which is already installed but it throws ModuleNotFoundError
This sounds like a classic case of multiple Python versions on the same machine.
Try a
pip --version
as well as a
python -m pip --version
and a
python --version
my guess is that the associated versions of Python are different (note the pip version won't be the same as the Python version: pip --version
on my machine gives: 'pip 22.3.1 from /opt/homebrew/lib/python3.10/site-packages/pip (python 3.10)'
). This is often the case where the user has an installed version, and the system comes with a version too; Macs often have this problem, for example.
My thoughts are to try
python -m pip install numpy
which should use a version of pip associated with the Python version you are using. If you want to play more with multiple Python versions, I recommend using pyenv or conda, which will allow multiple versions to be installed simultaneously with a better-defined separation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With