I have a AWS Ubuntu instance where I manually installed Python3.5 (downloaded it, configured, and ran make, make install). Then I changed the symbolic link
sudo ln -fs /opt/python3.5/bin/python3.5 /usr/bin/python3But then when I try to run pip:
ubuntu@xxx:/dev$ pip -V
pip 8.1.1 from /usr/local/lib/python2.7/dist-packages/pip-8.1.1-py2.7.egg (python 2.7)How can I fix this? Don't I need pip to be working with Python3? Should I have done anything differently? Thanks!
4 Answers
You need to install pip3.
sudo apt-get install python3-pip should do it.
Then use pip3 -V
I had to go through a slightly different procedure to get this working (Ubuntu 14.04--a local machine, not AWS). I think the difference may be that you were upgrading from 2.7 to 3.5, whereas I was updating from 3.4 to 3.5. I installed python3.5 through apt-get, then easy_install using curl, and finally pip using easy_install.
$ sudo apt-get install python3.5 python3.5-dev
$ sudo curl -o - | sudo python3.5
$ sudo easy_install pipSuccess!
$ pip3 -V
pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.5)As they say, it's turtles--or package managers--all the way down.
It's probably pip3 -V.
On my system I've got pip3, but no pip.
(rant: why python is always such a mess?)
2The following solution worked for me:
sudo pip install pip --user --upgrade
sudo apt-get install python3-pip
sudo pip3 install --upgrade setuptools