Under ubuntu18, when I use
python3 somepy.py
I got error: no module named numpy
Please refer to screen picture as below:
I searched a lot but didn't get out.
The command I'm using is "python3". I linked my /usr/bin/python3
to /usr/bin/python3.8
I also linked both /usr/bin/pip
and /usr/bin/pip3
to using the same pip3.8 path as shown in the picture.
Then I use pip3 install numpy=1.20.1
and displayed already installed.
But "no module named numpy" still exists. I don't know why. Is there any help?
Thank for the quick replies. I'll add 3 more pictures:
This picture shows I had used pip install -U numpy
and also shows how I run the python script
This picture: I tried with a python3 -m pip install numpy. It's strange the install can go on. I didn't understand why behave differently compared to before.
These 2 pictures shows python3 -m pip install numpy
still have fatal error. Also I didn't understand this error message Things seem to go more complicated to my dismay. But I'll search for this new error.
CodePudding user response:
Use this command to install numpy
.
python3 -m pip install numpy
CodePudding user response:
I installed numpy library with these commands
pip install -U numpy
pip3 install -U numpy