You are not logged in.

#1 2023-03-23 03:56:27

michaelmoreno
Member
Registered: 2021-10-04
Posts: 18

Installing Python from AUR did not include pip

On a fresh machine. Installed python3.11 using

yay -S python311

I assumed this would install a pip paired to the 3.11 executable as well. Yet when I type python3.11 -m pip I get unrecognized command. Is this expected behavior?

Perhaps I misunderstand the relationship between python and pip. I assumed that every python python executable on a system had it's corresponding pip, with pip on it's own pointing to your default python, and python3.x -m pip explicitly invoking the pip paired with python3.x. Is this not correct?

Offline

#2 2023-03-23 09:03:20

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,953
Website

Re: Installing Python from AUR did not include pip

Mod note: moving to AUR Issues


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2023-03-23 09:26:06

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,028

Re: Installing Python from AUR did not include pip

Pip is not included in the python package but has its own package , https://archlinux.org/packages/extra/any/python-pip/ .
Do you have python-pip installed ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2023-03-23 10:15:59

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 659

Re: Installing Python from AUR did not include pip

Lone_Wolf wrote:

Pip is not included in the python package but has its own package

The python-pip package is built for current Arch python 3.10 so is not relevant here. The OP's question amounts to "why is pip not included in the AUR package python3.11?". The OP should post on the python311 AUR page to ask if the `--without-ensurepip` can be removed in the PKGBUILD. I seems to me that should be removed so pip is then available, although I am not an expert.

I personally never use those AUR packages and prefer to simply use `pyenv install 3.11` which installs to `~/.pyenv/versions/`. I note pyenv does include pip for each built version.

Offline

#5 2023-03-23 10:32:59

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Installing Python from AUR did not include pip

bulletmark wrote:

The OP should post on the python311 AUR page to ask if the `--without-ensurepip` can be removed in the PKGBUILD. I seems to me that should be removed so pip is then available, although I am not an expert.

That flag only prevents the installer from running ensurepip; it should still be available to bootstrap pip manually (but care may be needed to prevent conflicts; I don't know the details): https://docs.python.org/3/library/ensurepip.html

Offline

#6 2023-03-23 10:40:17

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 659

Re: Installing Python from AUR did not include pip

Raynman wrote:

That flag only prevents the installer from running ensurepip.

Build the python311 package and you will see pip is not included. Edit the PKGBUILD to remove that switch then rebuild and you will see that pip is included.

Offline

#7 2023-03-23 11:04:38

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: Installing Python from AUR did not include pip

So it works as documented? I didn't really doubt that...

Offline

Board footer

Powered by FluxBB