Bug 1767212 - Updating to pip 19.3.x via pip breaks dnf installed pip
Summary: Updating to pip 19.3.x via pip breaks dnf installed pip
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pip
Version: 31
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:6526d4ee319fba2f4d5fab713ff...
: 1770527 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-30 22:18 UTC by A Guin
Modified: 2019-11-23 02:01 UTC (History)
9 users (show)

Fixed In Version: python-pip-19.0.3-4.fc30 python-pip-19.1.1-5.fc31 python-pip-18.1-2.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-19 01:15:07 UTC
Type: ---


Attachments (Terms of Use)
File: backtrace (696 bytes, text/plain)
2019-10-30 22:18 UTC, A Guin
no flags Details
File: cpuinfo (2.25 KB, text/plain)
2019-10-30 22:18 UTC, A Guin
no flags Details
File: environ (5.39 KB, text/plain)
2019-10-30 22:18 UTC, A Guin
no flags Details
File: mountinfo (2.27 KB, text/plain)
2019-10-30 22:18 UTC, A Guin
no flags Details
File: namespaces (129 bytes, text/plain)
2019-10-30 22:18 UTC, A Guin
no flags Details
File: open_fds (229 bytes, text/plain)
2019-10-30 22:18 UTC, A Guin
no flags Details

Description A Guin 2019-10-30 22:18:16 UTC
Description of problem:
I tried to pip3 install youtube-dl --user and was presented with this error. It came back with Traceback (most recent call last):
  File "/usr/bin/pip3", line 15, in <module>
    sys.exit(main())
TypeError: 'module' object is not callable

Version-Release number of selected component:
python3-pip-19.1.1-4.fc31

Additional info:
reporter:       libreport-2.10.1
cgroup:         0::/user.slice/user-1000.slice/user@1000.service/gnome-terminal-server.service
cmdline:        /usr/bin/python3 /usr/bin/pip3 install youtube-dl --user
crash_function: module
exception_type: TypeError
executable:     /usr/bin/pip3
interpreter:    python3-3.7.4-5.fc31.x86_64
kernel:         5.3.7-301.fc31.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
pip3:15:<module>:TypeError: 'module' object is not callable

Traceback (most recent call last):
  File "/usr/bin/pip3", line 15, in <module>
    sys.exit(main())
TypeError: 'module' object is not callable

Local variables in innermost frame:
__name__: '__main__'
__doc__: None
__package__: None
__loader__: <_frozen_importlib_external.SourceFileLoader object at 0x7fb940dcb550>
__spec__: None
__annotations__: {}
__builtins__: <module 'builtins' (built-in)>
__file__: '/usr/bin/pip3'
__cached__: None
re: <module 're' from '/usr/lib64/python3.7/re.py'>
sys: <module 'sys' (built-in)>
main: <module 'pip._internal.main' from '/home/aiden/.local/lib/python3.7/site-packages/pip/_internal/main.py'>

Comment 1 A Guin 2019-10-30 22:18:21 UTC
Created attachment 1630825 [details]
File: backtrace

Comment 2 A Guin 2019-10-30 22:18:22 UTC
Created attachment 1630826 [details]
File: cpuinfo

Comment 3 A Guin 2019-10-30 22:18:24 UTC
Created attachment 1630827 [details]
File: environ

Comment 4 A Guin 2019-10-30 22:18:25 UTC
Created attachment 1630828 [details]
File: mountinfo

Comment 5 A Guin 2019-10-30 22:18:26 UTC
Created attachment 1630829 [details]
File: namespaces

Comment 6 A Guin 2019-10-30 22:18:27 UTC
Created attachment 1630830 [details]
File: open_fds

Comment 7 Miro Hrončok 2019-10-30 22:31:13 UTC
The new pip (19.3) has this:

  from pip._internal.main import main
  ...
  sys.exit(main())


Our pip has:


  try:
      from pip._internal import main
  except ImportError:
      # user has most probably downgraded pip in their home
      # so let them run it anyway until ~/.local/bin makes it in front of the PATH
      from pip import main
  ...
  sys.exit(main())



So we need to add another level of hack \o/

Amber, as a workaround, please use "python3 -m pip".

Comment 8 Miro Hrončok 2019-10-30 23:56:57 UTC
Rawhide fix proposed at: https://src.fedoraproject.org/rpms/python-pip/pull-request/42

This affects all Fedoras, but the stable ones are on older versions and will require backports once the rawhide one is reviewed.

We also plan to update rawhide to 19.3+, but I'd rather have this fixed first and only then rework the patch to work the other way around.

Comment 9 Miro Hrončok 2019-11-10 09:32:19 UTC
*** Bug 1770527 has been marked as a duplicate of this bug. ***

Comment 10 Miro Hrončok 2019-11-10 09:33:26 UTC
Another user reported this on Fedora 30.

I'll work on backporting this first thing on Monday.

Comment 12 Petr Viktorin 2019-11-12 14:45:34 UTC
Should we replace /usr/bin/pip with a script that calls `python -m pip $ARGS` in a subprocess?

Comment 13 Fedora Update System 2019-11-12 16:26:39 UTC
FEDORA-2019-1d18566497 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-1d18566497

Comment 14 Fedora Update System 2019-11-13 10:47:03 UTC
python-pip-19.0.3-4.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-1d18566497

Comment 15 Fedora Update System 2019-11-13 10:52:52 UTC
python-pip-19.1.1-5.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-6d2a2381f2

Comment 16 Fedora Update System 2019-11-13 12:05:35 UTC
python-pip-18.1-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-8d7fa47fd5

Comment 17 Fedora Update System 2019-11-19 01:15:07 UTC
python-pip-19.0.3-4.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2019-11-19 01:35:33 UTC
python-pip-19.1.1-5.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2019-11-23 02:01:55 UTC
python-pip-18.1-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.


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