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?

  • You can easily check the name of the command by seeing what files a package contains: rpm -ql python3-pip – Tomas Tomecek Feb 19 '19 at 14:37

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.

  • Actually, this works from what I can tell. – Journeyman Geek Jul 19 '15 at 6:11
  • I don't know why @DavidPostill write it. This is good solution for this answer. – Denis Savenko Jul 20 '15 at 5:38
  • I do this in F21 still get bash: pip3: command not found... – dashesy Aug 22 '15 at 19:45

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.

  • 5
    Yep, something seems to be broken in Fedora 22 or some update path to it. The exact same happened for me and this solution fixed it. – Jonathon Reinhart Jan 22 '16 at 22:22
  • 4
    Same on Fedora 23. – Chris Townsend Apr 19 '16 at 12:03
  • 1
    I was also missing the /usr/bin/ pip3 folders on Fedora 23. reinstall fixed it for me as well. Thanks. – roflmyeggo Apr 30 '16 at 16:53
  • 3
    Same on Fedora 25. – icc97 Mar 5 '17 at 17:23

@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 ...

  • 2
    See Karthic Raghupathi's answer for a better solution. – Jonathon Reinhart Jan 22 '16 at 22:34
  • 1
    Don't manually copy, binaries/executables that are installed by package managers. Can have files with wrong permissions which can break updates etc – lxx Jun 23 '16 at 5:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.