Skip to content
Advertisement

What is the recommended replacement for pip in Debian/Ubuntu where there is no deb package available?

sudo apt-get install trac no longer finds trac.

sudo apt-git install pip no longer finds pip, but python has the command:

python -m ensurepip that is supposed to do the same thing but instead advises you to try something like:

sudo apt-git install python-trac which fails because there is no such package.

sudo apt-get install python-pip doesn not find pip (again, they disabled it, so what is the ALTERNATIVE to pip that they want us to use)

sudo apt-get install python-pip3 does get pip3 which fails when used to find trac, a python2 package, so I’m not looking for pip3, just pip for python2.

So it seems the “super-cow” powers of apt are backfiring here making it more difficult rather than easier to install packages. Do we need to be resort to manual installation from source now? Or is there a Debian-style way of installing pip packages on Debian that don’t have corresponding Debian packages?

(The output of python -m ensurepip is below:)

$ python -m ensurepip
ensurepip is disabled in Debian/Ubuntu for the system python.

Python modules For the system python are usually handled by dpkg and apt-get.

    apt-get install python-<module name>

Install the python-pip package to use pip itself.  Using pip together
with the system python might have unexpected results for any system installed
module, so use it on your own risk, or make sure to only use it in virtual
environments.

E: Unable to locate package python-pip results from sudo apt-get install python-pip as directed by the error message

I don’t see why they disable pip rather than modifying pip to check the debian repos first and then falling back on actual pip when the package is not found in debian. Any idea on that?

This is for Mint 20 (Ulyana)

$ cat /etc/apt/sources.list.d/official-package-repositories.list
deb http://packages.linuxmint.com ulyana main upstream import backport

deb http://mirrors.mit.edu/ubuntu focal main restricted universe multiverse
deb http://mirrors.mit.edu/ubuntu focal-updates main restricted universe multiverse
deb http://mirrors.mit.edu/ubuntu focal-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ focal partner

(Maybe this is why people are moving from Ubuntu & Mint to MX & Manjaro)

Advertisement

Answer

Mint is broken. It works properly in some other Debian based distros like MX.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement