I'm trying to install numpy for python3, and I used sudo apt-get install python3-numpy
to install numpy as I use Jetson tx2.
Although the installation is successful, but numpy is installed on python2.7 not python3. How can I solve it?
I'm trying to install numpy for python3, and I used sudo apt-get install python3-numpy
to install numpy as I use Jetson tx2.
Although the installation is successful, but numpy is installed on python2.7 not python3. How can I solve it?
Actually when you flash your Jetson TX2 with Jetpack (version), numpy package is present for Python2 by default and not for Python3.
In order to install numpy for Python3 Please follow the steps given below:-
1. Check if you have pip3 installed for Python3. If not install pip3.
sudo apt install python3-pip
2. Then using pip3 install numpy
pip3 install numpy
After installation check the location: /usr/local/lib/python3.6/dist-packages you will find numpy installed for Python3
Hope this helps!
I think this is because your default interpreter is Py v2.7 Check this by runnin in console:
python -V
Then you can specify Py3 installation as was commented above:
pip3 install numpy
Note: Do not run this command with sudo because it will run setup.py with sudo or
in other words - an arbitraty upload a malicious project on PyPI this is a hight risk action.