

See Python for Formula Authors for advice on writing formulae to install packages written in Python. I think this effectively shows that apt is not playing any role in this issue.This page describes how Python is handled in Homebrew for users. Now I’ll install pip over itself an you’ll notice that whenever I install the python3 version it overwrites pip: $ sudo python get-pip.py

I then ran the following per the instructions on the pypi pip installation page: $ curl -o get-pip.pyġ00 1669k 100 1669k 0 0 3436k 0 -:-:-:-:-:-:- 3442k So I uninstalled all versions of pip by doing the following: sudo apt-get remove python-pip python3-pip -yes Pip 19.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7) Pip 19.1 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)įorcing the pip (pip2) upgrade re-associates pip with python 2.x: $ sudo python -m pip install pip -upgrade -force-reinstall Running the pip3 upgrade breaks pip: $ sudo python3 -m pip install pip -upgrade -force-reinstall I get that we’re trying to get users to migrate away from python 2.x, but there are plenty of people that still (and still will) use python 2.x and have historically been using pip to install python 2.x packages. I think there’s a pretty long-running convention that python -> 2.x and python3 -> 3.x - for that same reason, the convention should hold with pip -> python 2.x and pip3 -> python 3.x - doing otherwise is just confusing. If you run sudo pip3 install pip -update it will update pip3, but it will also update the pip binary and now running pip to install a package will install the package for Python 3.x, not 2.x sudo apt-get install pip) you get pip3 for Python 3.x. sudo apt-get install python-pip) you get pip for Python 2.x.
