Rajkumar Rajendran Rajkumar Rajendran - 6 months ago 13
Python Question

How to switch between python2 and python3 pip on Fedora 22?

As I have started to use Python 3.4, I need pip to maintain libraries on both Python 2.7 and Python 3.4.

How to select the appropriate pip quickly using terminal?

Note:
This question is NOT related to Virtualenv but with the default python2.7 and python3.4 that comes with Fedora 22 Workstation.

As a temporary fix, I am using PyCharm to manage libraries.

Answer

Fedora separates Python 2.x and 3.x's environments. yum install python-pip will give you an executable called pip which you can use for Python 2.x packages, and yum install python3-pip will give you an executable called pip3for managing Python 3.x packages.

You can install either, both or neither - they will not interfere with each other.