You are not logged in.

#1 2023-05-08 14:19:36

Registered: 2022-02-19
Posts: 28

configuring pip with different python versions from AUR

I am doing a source build of a python package, CAD_to_OpenMC. One of it's dependencies requires python<3.11.  Running the following in a clean environment

yay -Syy python python-setuptools python-build python-installer python-pip
git clone
cd CAD_to_OpenMC
python -m build --wheel --no-isolation
python -m installer dist/*.whl
python -m pip install -r requirements.txt

produces the following error

ERROR: Ignored the following versions that require a different python version: 2.2.0 Requires-Python >=3.8,<3.11; 2.2.0b0 Requires-Python >=3.8,<3.11; 2.2.0b1 Requires-Python >=3.8,<3.11; 2.2.0b2 Requires-Python >=3.8,<3.11
ERROR: Could not find a version that satisfies the requirement cadquery==2.2.0b2 (from versions: 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.7, 0.1.8, 0.2.0, 0.3.0, 0.4.0, 0.4.185, 0.4.186, 0.5.1, 0.5.2, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 1.2.4, 1.2.5)
ERROR: No matching distribution found for cadquery==2.2.0b2

I can install previous versions of python from the aur, like python39, however none of them actually come with pip. But the problem is that python-pip depends on python, which is currently 3.11.3. So if I install python39 and python-pip, pip will still be using python3.11.

How can I add the pip module to the earlier versions of python provided by the aur? (preferably without manual patches to those PKGBUILDS, as I want to eventually list them as dependencies to CAD_to_OpenMC's PKGBUILD)


#2 2023-05-08 15:13:02

Registered: 2012-09-02
Posts: 886

Re: configuring pip with different python versions from AUR

python3.9 -m ensurepip

will put pip3.9 in your ~/.local/bin/ I think. (Maybe you need to add "--user" too?)

Last edited by Morn (2023-05-08 15:17:43)


Board footer

Powered by FluxBB