Resolution of the library-path mess
Daniele Nicolodi
daniele at grinta.net
Sat Oct 7 00:37:53 UTC 2017
On 06/10/17 17:43, Gary E. Miller via devel wrote:
> Yo Daniele!
>
> On Fri, 6 Oct 2017 16:57:13 -0600
> Daniele Nicolodi <daniele at grinta.net> wrote:
>
>>>> What if I want to have 2.7.1 and 2.7.2, for example?
>>>
>>> Gentoo can easily do that as well. Pretty common on gentoo.
>>
>> How? It is clearly not possible with the scheme you described before.
>
> Not gonna worry about. Not an issue here.
>
>> It is not clear to me how an user component installing files in /usr
>> is seen as a violation of policy, but a system component installing or
>> picking up files into /urs/local is fine.
>
> Uh, no. The problem here is a user installed component installing
> into, and protentially over-writing, system installed companaents.
>
> I am not aware of any system installed component that looks in
> /usr/local without specific user instructions to do so.
>
> So I'm not seeing where you are going with this?
This exchange started with me stating the reason why python does not
look for modules outside its installation path, or why a python
interpreter installed in /usr/bin and loading modules from /usr/lib/
does not have (unless so explicitly instructed) dirs in /usr/local/lib/
in its module paths.
The reason is that a python interpreter cannot assume that any other
path, outside the one in which it has been installed belongs to him.
You replied that this is not true, because the path are versioned with
the python major and minor version number. That's works as soon as you
want to install two python versions that share the same major and minor
version number.
Debian solves the problem of installing user components in the system
path creating a dist-libraries along the site-libraries path in the
python module folder.
The python way to avoid the clash is to use virtual environments, which
I suggested several times now, but it seems that it is a too complex of
a concept to be picked up. Please go on debating your /usr vs
/usr/local and PYTHONPATH issues.
Cheers,
Daniele
More information about the devel
mailing list