28

I can't run pip for python3 (3.4) on Fedora 22. Pip for python2.7 is installed on system by default and works fine. I install package python3-pip but can't run it.

pip3, pip-3.4, python3-pip, python3 pip

The above commands don't work for me and show error 'command not found'.

I try delete pip for python2.7 but it's so important for system and I can't do that.

How can I run pip3?

Eric Leschinski
  • 7,393
  • 7
  • 51
  • 51

3 Answers3

42

If it is properly installed you can run python3 -m pip to run pip for Python 3.

Installing pip for Python 3 is done with dnf install python3-pip. This should create the script /usr/bin/pip3. Using pip to upgrade pip itself (like it suggests, because the shipped version is older) overwrites the scripts and should not be done.

If you want to use the newest version of pip and and upgrade packages given by the fedora-repo to the ones from PyPI, I recommend using a virtual environment.

burny
  • 536
32

I could not run pip3 though my system showed python3-pip as already being installed and I'm using Fedora 22. What I did to get around this was re-install python3-pip like so:

dnf reinstall python3-pip

Doing the above adds the following entries in your /usr/bin folder:

  • /usr/bin/pip3.4
  • /usr/bin/pip3

You'll need to be have sudo rights to run the above command. Now I'm able to just call pip3 right from my CLI.

0

@bumy's fix worked for me ... but I was annoyed that despite having python3-pip installed on my newly installed Fedora 22, /usr/bin/pip3 wasn't present.

So I copied /usr/bin/pip (the Python2.7 version) to /usr/bin/pip3 and modified the first line to be #!/usr/bin/python3

Now I can use pip3 as god intended ...