Skip to content

pip v10 breaks Debian/Ubuntu pip3 command #5221

Closed
@iamarcel

Description

@iamarcel

Maintainer note: Anyone that still gets this issue please see #5599.


  • Pip version: 10.0.0
  • Python version: 3.5.2
  • Operating system: Ubuntu 16.04 (EDIT: tested on debian:9.4 too, same thing happens)

Description:

When upgrading pip (to v10) on at least Ubuntu 16.04, the pip3 command stops working ("cannot import main", see below). This is on a fresh install.

What I've run:

(Note that I've stripped out all the apt output etc., since I think it's not needed here. Let me know if you still want it!)

me@host$ sudo docker run -it ubuntu:xenial

root@container# apt update && apt install python3-pip

root@container# pip3 --version
pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.5)

root@container# pip3 install --upgrade pip
Collecting pip
  Downloading pip-10.0.0-py2.py3-none-any.whl (1.3MB)
    100% |################################| 1.3MB 1.4MB/s 
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Successfully installed pip-10.0.0

root@container# pip --version
pip 10.0.0 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)

root@container# pip3 --version
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'

root@container# cat /usr/bin/pip3
#!/usr/bin/python3
# GENERATED BY DEBIAN

import sys

# Run the main entry point, similarly to how setuptools does it, but because
# we didn't install the actual entry point from setup.py, don't use the
# pkg_resources API.
from pip import main
if __name__ == '__main__':
    sys.exit(main())

Not sure if this is something that should be fixed on the pip side or on the Debian side.

Metadata

Metadata

Assignees

No one assigned

    Labels

    project: <downstream>When the cause/effect is related to redistributors

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions