You are not logged in.

#1 2024-05-04 02:16:00

Registered: 2024-05-04
Posts: 1

Pacman installing Python packages in the previous version directory

My system originally had Python 3.10 installed. A few days ago I upgraded the full system, and the Python version was upgraded to 3.11.

However, I faced a problem when I installed the Python packages using `pacman -S python-*`, it was installed in `/usr/lib/python3.10/site-packages` not 3.11.

Because of this problem, executing the Python scripts will result in a ModuleNotFoundError. What's going on and how do I fix it?

This is the current state of my Python environment:

$ python --version
Python 3.11.8

$ which python

$ pip --version
pip 24.0 from /usr/lib/python3.11/site-packages/pip (python 3.11)

$ which pip


#2 2024-05-04 07:34:06

From: Zurich
Registered: 2019-11-14
Posts: 991

Re: Pacman installing Python packages in the previous version directory

We are currently in the middle of a Python 3.12, so rebuilding packages for 3.11 is not really possible.
You can maybe fetch an older version of the Python package with

pkgctl repo clone --protocol=https --arch32 python-XXX

You have to install the package for that for the --arch32 patching to work.

You can of course also use the upstream devtools (without the --arch32) and do the patching of the architecture
field (arch) and the appending of the Arch32-specific part from
(if it exists) by hand and then build and install that package.


Board footer

Powered by FluxBB