Skip to content

By default, which version of python should pip point to? python 2.7, python 3.5 pip 9.0.1 #4276

@whimsyniche

Description

@whimsyniche
  • Pip 9.01:
  • Python 2.7 and 3.5:
  • Ubuntu Mate 16.04:

Description:

Question: by default, which version of python should pip point to? Can it be changed?

Similar question was raise at:

http://stackoverflow.com/questions/26266437/how-to-use-python2-7-pip-instead-of-default-pip

This relates as well:
termux/termux-packages#429

Below, I updated pip{2,3} after I installing python-pip and python3-pip.
(I should have checked which version of pip it was defaulting to prior.)

apt-get install python-pip
apt-get install python3-pip

pip install -U pip
pip3 install -U pip

I don't remember if it said it's already updated to 9.0.1, and perhaps that's why I ran this:
pip2 install -U pip

From experience, I've setup Munki (on macOS 10.10 py2.7) according to the setup guide; however, no mention of checking or setting a default interpreter:
https://github.com/munki/munkiwebadmin/wiki/MunkiWebAdmin-OSX-Setup

Now, that pip points to python 3.5. I'm wondering when I install virtualenv later on. Will it have python 2.7 as the default interpreter or python 3.5 as pip says?

I guess I can just run pip2 and pip3 to install virtualenv or follow the guide here:
http://docs.python-guide.org/en/latest/dev/virtualenvs/

What I've run:

pip -V
pip 9.0.1 from /usr/local/lib/python3.5/dist-packages (python 3.5)
pip2 -V
pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)
pip3 -V
pip 9.0.1 from /usr/local/lib/python3.5/dist-packages (python 3.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions