Bug 1459244 - pip3 and pip3.5 not available in /usr/bin/
pip3 and pip3.5 not available in /usr/bin/
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: python3 (Show other bugs)
25
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Charalampos Stratakis
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-06 11:40 EDT by Víctor R. Ruiz
Modified: 2017-06-07 04:51 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-06-06 20:36:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Víctor R. Ruiz 2017-06-06 11:40:21 EDT
Description of problem:

After installing Fedora 25, pip3 and pip3.5 are not available in /usr/bin directory.

Version-Release number of selected component (if applicable):
python3-pip-8.1.2-2.fc25.noarch

Steps to Reproduce:
1. Install Fedora.
2. Check that python3-pip is installed by default: rpm -ql python3-pip
3. Check that python3-pip scripts are installed: ls -l /usr/bin | grep pip3

Actual results:
- python3-pip is installed.
- pip3 and pip3.5 scripts aren't available at /usr/bin/

Expected results:
- python3-pip is installed.
- pip3 and pip3.5 scripts are available at /usr/bin/ and can be executed.

Additional info:
- Running Fedora 25 with updates installed.
- Reinstalling python3-pip solves the issue: sudo dnf reinstall python3-pip
Comment 1 Miro Hrončok 2017-06-06 12:59:41 EDT
If reinstalling python3-pip solves the issue, I'm unsure what can we do here.

BTW Have you ever used `sudo pip3 ...`?
Comment 2 Víctor R. Ruiz 2017-06-06 13:18:59 EDT
Well, the expectation is that pip3 and pip3.5 must be available in
/usr/bin/. They are listed as is in rpm -ql python3-pip.

I executed these commands before reinstalling the package:

[rvr@localhost archivos]$ which pip
/usr/bin/pip
[rvr@localhost archivos]$ which pip3
/usr/bin/which: no pip3 in
(/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/rvr/.local/bin:/home/rvr/bin)
[rvr@localhost archivos]$ rpm -qa pip3
[rvr@localhost archivos]$ rpm -qa python3-pip
python3-pip-8.1.2-2.fc25.noarch
[rvr@localhost archivos]$ rpm -ql python3-pip
/usr/bin/pip3
/usr/bin/pip3.5
.
.
.
/usr/share/licenses/python3-pip
/usr/share/licenses/python3-pip/LICENSE.txt

This problem has been reported in StackOverflow as back as in Fedora
22: https://superuser.com/questions/941418/run-pip-for-python3-on-fedora

For some reason, pip3 and pip3.5 are not in /usr/bin after the system is installed and they must be.
Comment 3 Miro Hrončok 2017-06-06 13:49:21 EDT
(In reply to Víctor R. Ruiz from comment #2)
> Well, the expectation is that pip3 and pip3.5 must be available in
> /usr/bin/.

And they are.

> They are listed as is in rpm -ql python3-pip.

And so they are.


> [rvr@localhost archivos]$ which pip3
> /usr/bin/which: no pip3 in
> (/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/rvr/.local/bin:/
> home/rvr/bin)

That indicates to me that your system must have been tempered with.


> For some reason, pip3 and pip3.5 are not in /usr/bin after the system is
> installed and they must be.

Just to be sure: You've installed Fedora 25 and right after before you did anything else, the /usr/bin/pip3 was missing?
Comment 4 Víctor R. Ruiz 2017-06-06 13:58:20 EDT
Please, read this thread: https://superuser.com/a/972416
Comment 5 Charalampos Stratakis 2017-06-06 16:06:06 EDT
python3-pip is a runtime dependency of python3 which means that if you get python3 with the base install (which you should as dnf, abrt and others use it), then you should have the pip3 binary.

When spawning a new F25 vm, it seems both python3 and pip3 are included.

rpm -ql python3-pip | grep bin
/usr/bin/pip3
/usr/bin/pip3.5

Will try to reinstall from scratch and see if that is indeed the issue.
Comment 6 Charalampos Stratakis 2017-06-06 16:08:18 EDT
(In reply to Víctor R. Ruiz from comment #4)
> Please, read this thread: https://superuser.com/a/972416

Python 3 is the default interpreter included in Fedora workstation iso since Fedora 23 [0]

[0] https://fedoraproject.org/wiki/Changes/Python_3_as_Default
Comment 7 Miro Hrončok 2017-06-06 16:34:16 EDT
(In reply to Víctor R. Ruiz from comment #4)
> Please, read this thread: https://superuser.com/a/972416

Sure, I've read it. I am trying to realize what causes it. To my best knowledge, the files are there upon installation and something removes them. My best guess is a call to "sudo pip3"...
Comment 8 Víctor R. Ruiz 2017-06-06 20:36:25 EDT
I reinstalled Fedora 25 on a virtual machine, updated the packages, and pip3 and pip3.5 are there as expected. I took a look to dnf logs and found that I also installed python-pip. Then I was able to reproduce the problem with my setup with:

[rvr@localhost ~]$ sudo pip install --upgrade pip
Collecting pip
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 731kB/s 
Installing collected packages: pip
  Found existing installation: pip 8.1.2
    Uninstalling pip-8.1.2:
      Successfully uninstalled pip-8.1.2
Successfully installed pip-9.0.1
[rvr@localhost ~]$ ls -l /usr/bin | grep pip
-rwxr-xr-x.   1 root root      868312 mar 21 08:45 epiphany
-rwxr-xr-x.   1 root root        3143 may 16 15:48 lesspipe.sh
-rwxr-xr-x.   1 root root         204 jun  7 01:31 pip
-rwxr-xr-x.   1 root root         204 jun  7 01:31 pip2
-rwxr-xr-x.   1 root root         204 jun  7 01:31 pip2.7
[rvr@localhost ~]$

pip3 and pip3.5 are gone, but pip (2) itself is the one to blame. Sorry for the inconvinience. I am closing this bug here.
Comment 9 Miro Hrončok 2017-06-07 04:51:31 EDT
Please never ever call pip with sudo.

Note You need to log in before you can comment on or make changes to this bug.