I'm attempting to install numpy on python3.5 via :
python3.5 -m pip install numpy
but receive error :
/usr/local/bin/python3.5: No module named pip
Same error for pip3 :
python3.5 -m pip3 install numpy
/usr/local/bin/python3.5: No module named pip3
Reason I'm attempting to install numpy this way is pip3 is pointing to a 3.4 dist-packages
dir :
pip3 install numpy
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/local/lib/python3.4/dist-packages
Cleaning up..
How to install numpy to Python 3.5 ?
Update:
I decided to use docker in order to install on a clean ubuntu14.04 environment and it worked out of box.
Although using virtual environment is advisable in many use-cases, it is not strictly required. You can have a system python3.5
and a pip
installation associated with it.
Note that Python 3.5 is now end-of-life and pip has now dropped support. The final version of pip supporting Python 3.5 was 20.3.4 (Jan 2021).
pip-20.3.4-py2.py3-none-any.whl
sudo python3.5 pip-20.3.4-py2.py3-none-any.whl/pip install pip-20.3.4-py2.py3-none-any.whl
python3.5 -m pip install --user numpy
I strongly recommend using a virtual environment and in the case of the scientific Python stack, I further recommend using anaconda. It will save you loads of headaches in the future.
conda install numpy
.Step 2 looks like this:
conda create --name env_name numpy
Step 3 looks like this:
source activate env_name
Step 4 looks like this:
conda install numpy
Now, anytime you want to use numpy
or any other dependency in your environment, you just do source activate env_name
.
To deactivate, do:
source deactivate
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