Cannot install python-pip, python-typing

9 réponses [Dernière contribution]
red_liberty
Hors ligne
A rejoint: 12/15/2019

I get the following errors:

root@Trisquel:/home/user# apt install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-pip' has no installation candidate

I went to this site (https://pip.pypa.io/en/stable/installing/) to do a manual install (which it recommended against saying: "Be cautious if you are using a Python install that is managed by your operating system or another package manager. get-pip.py does not coordinate with those tools, and may leave your system in an inconsistent state.") and it installed so I could use it however the system itself did not recognize python-pip as being installed and thus it was useless to me. I did "pip uninstall pip" to remove it and now I am back to square 1. How can I safely install python-pip? I need it as a dependency for several applications.

Thanks!

chaosmonk

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/07/2017

> How can I safely install python-pip?

pip searches and installs software from the PyPi repository, which
contains proprietary software. According to the Free System
Distribution Guidelines:

"The system should have no repositories for nonfree software and no
specific recipes for installation of particular nonfree programs. Nor
should the distribution refer to third-party repositories that are not
committed to only including free software"

As an FSF-endorsed distro, Trisquel follows the FSDG, so we cannot
include pip in our repositories.

> I need it as a dependency for several applications.

What do you need it for? Perhaps a workaround is possible.

[1] https://www.gnu.org/distros/free-system-distribution-guidelines.html

red_liberty
Hors ligne
A rejoint: 12/15/2019

I needed it to compile Tribler and ZeroNet. I do NOT want non-free software on my computer, but since Tribler and ZeroNet are free I'd imagine they wouldn't use pip to install any non-free software with pip anyways so I don't think it would do any harm as long as I kept an eye on it. I do not at present know of any workarounds here unfortunately. Any suggestions? If I wanted to install it anyways are there any workarounds?

chaosmonk

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/07/2017

> I needed it to compile Tribler and ZeroNet.

ZeroNet does not seem to actually depend on pip. The README is just
recommending that you install ZeroNet's dependencies from the PyPi
repository using pip. As long as you make sure that all of those
dependencies are free (and all of their dependencies, and all of their
dependencies' dependencies, etc.) are free, this shouldn't result in any
non-free software on your system.

Tribler appears to actually depend on pip, not just to compile, but also
to install. This strikes me as unusual. Do you know why Tribler might
require pip at runtime?

> I do NOT want non-free software on my computer, but since Tribler and
> ZeroNet are free I'd imagine they wouldn't use pip to install any
> non-free software with pip anyways so I don't think it would do any
> harm as long as I kept an eye on it.

Just because a program is free does not mean it does not install
non-free software, pip itself being an example.

> If I wanted to install it anyways are there any workarounds?

Magic Banana's instructions should work. Just be aware that, whereas
when you install software from Trisquel's repositories you can assume
that it should only pull in free packages, with pip you need to go to
pypi.org[1] and check the software out yourself. And it's not enough to
check that the package you want to install is free;, you need to
recursively check the entire dependency tree.

[1] https://pypi.org/

red_liberty
Hors ligne
A rejoint: 12/15/2019

Thanks, I installed it to test Tribler (which for whatever reason installed but did not load the GUI) and then I promptly uninstalled it with its associated *potentially* proprietary-enabling dependencies (pip)! I may try it in a Debian Qubes VM and I'm sure I'll have better luck there.

With pip such a fundamental part of Python it upsets me that this is not free, that the repositories it uses are not free (so it's at least like Debian in regards to freedom). I wish it was, or that there was a librepip that only allowed free software. I mean for a programming language you would think that would be a prerequisite to packaging related software but apparently not.

Obviously this is not Trisquel's fault, but it is still a bit annoying. And Tribler is in the software manager GUI for Trisquel so maybe it shouldn't be with pip as a dependency (regardless of how cool the app is)?

chaosmonk

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/07/2017

> With pip such a fundamental part of Python

Pip is not a fundamental part of Python,

> it upsets me that this is not free, that the repositories it uses are
> not free

but it's a common way to distribute Python packages, so it's unfortunate
that the PyPi repository contains non-free software.

> (so it's at least like Debian in regards to freedom).

Debian has its problems, but it is better than PyPi. Everything in
Debian's main repository (including pip) is under a free license. Being
under a free license is not enough to comply with the FSDG, but Debian's
standards are higher than PyPi's.

> I wish it was, or that there was a librepip that only allowed free
> software.

There has been some discussion along these lines.

https://trisquel.info/en/forum/librepip-installer

https://trisquel.info/en/forum/fsdg-and-pip

> And Tribler is in the software manager GUI for Trisquel so maybe it
> shouldn't be with pip as a dependency (regardless of how cool the app
> is)?

Add/Remove Applications uses outdated backend data, reflecting the
packages that were available in Ubuntu in 2015. Tribler does appear in
Add/Remove Applications, so it presumably was packaged by
Ubuntu/Trisquel in 2015, but it is not in either distro's repositories
currently. Regenerating application data to match what is actually in
Trisquel's repositories now is something we are working on for Trisquel
9.

calher

I am a member!

Hors ligne
A rejoint: 06/19/2015

On 12/23/2019 12:53 AM, name at domain wrote:
> Everything in
> Debian's main repository (including pip) is under a free license.

Since Pip is used to install proprietary software, it's odd that Debian
has not put Pip into contrib.

chaosmonk

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/07/2017

> > Everything in Debian's main repository (including pip) is under a
> > free license.
>
> Since Pip is used to install proprietary software, it's odd that
> Debian has not put Pip into contrib.

Debian would probably only move it to contrib if it *required* non-free
software. Same goes for Snap, Firefox, etc. Unlike the FSDG, the
DFSG[1] is only concerned with the license of software packaged in
distro's main repository. There is no policy regarding third-party
repositories like PyPi.

[1] https://www.debian.org/social_contract#guidelines

apitsch (non vérifié)
apitsch

In general, when programming with python, you might want to have multiple versions of python available - and even if not required by your developing work, you still might want to separate the system python from the python version you use for programming.

An extremely handy tool for this is pyenv (https://github.com/pyenv/pyenv). See https://realpython.com/intro-to-pyenv/ for a good introduction on how to use pyenv.

Why am I saying all this? Because once you have pyenv installed, you can install a separate python version on your computer in which pip will be available.

To keep your computer free from proprietary software, you will of course have to check manually all licences of the packages (and as others have pointed out correctly, also their dependencies) you install through pip.

Magic Banana

I am a member!

I am a translator!

Hors ligne
A rejoint: 07/24/2010

From https://packages.ubuntu.com/xenial-updates/all/python-pip-whl/download and https://packages.ubuntu.com/xenial-updates/all/python-pip/download respectively you can download pyton-pip-whl.deb and python-pip.deb. You can install them, in that order, by double-clicking on the files or, if you prefer the terminal (or if you removed GDebi, for some reason), with 'sudo dpkg -i pyton-pip-whl.deb python-pip.deb'.

As you were told: you are then on your own when it comes to checking whether what you install (including the dependencies!) is free software.