Save the pip3 file and exit. This should be sufficient to associate pip3 with the correct environment. Check and verify the result with pip3 --version. Now pip3 install numpy should work as expected.
It seems that pip3 refers to Python-2.7's pip module. However, you can install packages directly using the intended Python version. You'd need to just use -m option.
python3.6 -m pip install numpy
Another option is to changing the source path that pip3 refers to. You can do this by fining the path of Python-3.6's pip and just bind it to pip3 alias name.
Find the absolute path of the
python3
interpreter with a command like this:Your path may be something different, of course. Copy that line to your clipboard.
Edit the
pip3
script, which was installed using incorrect interpreter. Something like this:You might need to use
sudo
here, but try it first without. The first line will be something like:Change it to the path found in the previous step, e.g.
Save the
pip3
file and exit. This should be sufficient to associatepip3
with the correct environment. Check and verify the result withpip3 --version
. Nowpip3 install numpy
should work as expected.It seems that
pip3
refers to Python-2.7's pip module. However, you can install packages directly using the intended Python version. You'd need to just use-m
option.Another option is to changing the source path that
pip3
refers to. You can do this by fining the path of Python-3.6's pip and just bind it topip3
alias name.