deadsnakes / issues

Issues for https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
86 stars 6 forks source link

Lacking pythonX.Y-pip package #230

Closed jkugler closed 2 years ago

jkugler commented 2 years ago

description

I'm installing Python 3.6 on Ubuntu 20.04 and trying to get Pip up and running. Running python -m ensurepip --upgrade tells me the module isn't installed, but there is not python3.6-pip package.

Running python -m ensurepip (system Python) gives:

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 install python3-<module name>

Install the python3-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.

That makes sense, and I would install python3-pip if I was using system Python. But that hamstrings me when I'm running python3.6 because I can't install the python3.6-pip package.

Thanks for maintaining old versions. It's greatly appreciated!

os information

Ubuntu 20.04

lsb_release -a

$ lsb_release -a
LSB Version:    core-11.1.0ubuntu2-noarch:printing-11.1.0ubuntu2-noarch:security-11.1.0ubuntu2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.5 LTS
Release:        20.04
Codename:       focal

uname -a

Linux hosanna 5.18.10-76051810-generic #202207071639~1659403207~20.04~cb5f582~dev-Ubuntu SMP PREEMPT_DY x86_64 x86_64 x86_64 GNU/Linux
asottile commented 2 years ago

you'd just use python3-pip as the PPA page talks about (pure python packages)

though I'd argue you should NOT be using sudo pip install unless you want to break your system

there's also a bunch of duplicates -- please search the tracker next time! https://github.com/deadsnakes/issues/issues?q=is%3Aissue+pip+is%3Aclosed

jkugler commented 2 years ago

Thank you for taking the time to answer this. I'm setting up virtual envs for testing, so I installed python3.6-venv, and that got me pip, which let me run /usr/bin/python3.6 -m pip install --user.

Looks like I clicked "Close" on this just about the same time you clicked "Comment." :D

igozali commented 1 year ago

Apologies for hijacking an old thread, but @asottile would you have some guidance for whether using the python3-pip package is generally preferred to installing pip from bootstrap.pypa.io e.g. curl -sS https://bootstrap.pypa.io/get-pip.py | /usr/bin/python3.11 (where python3.11 is installed from the deadsnakes ppa)?

asottile commented 1 year ago

I wouldn't do either. make a virtualenv