can we have a single custom path for user’s package installation in python, right now if I install a package with root user that goes into a directory like = /usr/local/lib/python3.6/site-packages
if I install with user AAA, it goes as follows
if I install like user BBB, it goes as follows
I want a universal package install path irrespective to users for example I want to set /usr/local/lib/python3.6/site-packages as default path for all users packages .
or would be there any permission related issue ?
There would be permissions issues - I would not expect an arbitrary user
to have write permission to a central area like that. But also, it is
normally a bad idea to do this. Do you really want user AAA to be able
to install a package which user BBB always picks up? What if user BBB
installed (and therefore expected) a different version of the package?
sys.path addresses this by having the
~/local/lib/python3.6/site-packages directory ahead of the central
/usr/local/lib/python3.6/site-packages directory, allowing users to
override the default packages at their discretion without writing into
a single central shared area.
If you do want a shared area for a specific purpose, I would recommend a
central virtualenv in a project area, which the users being members of a
group associated with the project. Or merely that they share a source
repository and install locally (personally to the user) according to
some specification (see pip’s
Cameron Simpson firstname.lastname@example.org