I am installing a python X module which is dependent on Y software.
There are two versions of Y software available, one that comes with operating system and another I installed it to a custom folder.
When I install "python X" module, I am asking it to take Y from my custom folder as a dependency.
The installation is successful, but while running that "python X" module as a application user then it is always taking Y ( it is making use of the libraries from Y) which is coming with operating system.
If we assume a.py is making use of "python X" module and
if I run
python a.py
then "python X" module is taking Y from my custom folder, but when I do
sudo -u user1 python a.py
then "python x" module is taking Y installed from operating system..
Could you let me know how to make "python x" module to always take from my custom folder for whichever user.