Hi all
I'm trying to run some Python programs that requiere some third party libraries and I'm having some problems installing them as a regular user.
This is the folder structure:
[root@~]# ls -lh /usr/uv/python/
drwxr-xr-x 2 root root 4,0K jul 17 13:21 bin
drwxr-xr-x 3 root root 22 jun 15 2021 include
drwxr-xr-x 4 root root 106 jun 15 2021 lib
drwxr-xr-x 3 root root 16 jun 15 2021 share
drwxr-xr-x 2 root root 29 jun 15 2021 syslib
[root@~]# ls -lh /usr/uv/python/lib/python3.9/ | grep site-pac
drwxr-xr-x 18 root root 4,0K jul 17 13:21 site-packages
On another server there are some differences, and the owner is the uvdb user, not root.
[root@~]# ls -lh /usr/uv/python/
drwxr-xr-x 2 uvdb root 4.0K May 16 13:14 bin
drwxr-xr-x 3 uvdb root 24 Oct 18 2023 include
drwxr-xr-x 4 uvdb root 114 Oct 18 2023 lib
drwxr-xr-x 3 uvdb root 17 Oct 18 2023 share
drwxr-xr-x 2 uvdb root 68 Oct 23 2023 syslib
When I try to install some package it's going to be installed in the user space, so it's not available for all the users:
SH-4.2$ /usr/uv/python/bin/python3 -m pip install slugify
Defaulting to user installation because normal site-packages is not writeable
This can be circumvented installing packages as root, but this seems as a hack brute force solution.
I tried changing owners of the site-packages folder, so now it's owned by a group to which all my users belong, and the packages then installed for all users. The problem is that some packages need to write to the bin folder, the one that is owned by uvdb, and I'm hesitant to change ownership there and break something in the Python integration.
Is there a way to solve this issues via configuration or installation?
------------------------------
Héctor Cortiguera
Quiter Servicios Informaticos SL
------------------------------