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/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'>
Created attachment 1630825 [details] File: backtrace
Created attachment 1630826 [details] File: cpuinfo
Created attachment 1630827 [details] File: environ
Created attachment 1630828 [details] File: mountinfo
Created attachment 1630829 [details] File: namespaces
Created attachment 1630830 [details] File: open_fds
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".
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.
*** Bug 1770527 has been marked as a duplicate of this bug. ***
Another user reported this on Fedora 30. I'll work on backporting this first thing on Monday.
https://src.fedoraproject.org/rpms/python-pip/pull-request/43 https://src.fedoraproject.org/rpms/python-pip/pull-request/44 https://src.fedoraproject.org/rpms/python-pip/pull-request/45
Should we replace /usr/bin/pip with a script that calls `python -m pip $ARGS` in a subprocess?
FEDORA-2019-1d18566497 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-1d18566497
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
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
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
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.
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.
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.