On 2020-03-11, Marc Joliet <mar...@gmx.de> wrote:
> Am Mittwoch, 11. März 2020, 18:54:43 CET schrieb Grant Edwards:
>> [...]
>> Q: Under what conditions will having a second installation of a Python
>>    library under .local cause problems?
>
> IIUC you shouldn't have any problems, simply because ~/.local/ is not part of 
> the system python's module search path:
>
> % python3
> Python 3.6.10 (default, Feb 26 2020, 01:09:02) 
> [GCC 9.2.0] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import sys                 
>>>> sys.path
> ['', '/usr/lib64/python36.zip', '/usr/lib64/python3.6', '/usr/lib64/python3.6/
> lib-dynload', '/usr/lib64/python3.6/site-packages']

Except it is for me (and I don't know how it gets there):

    $ which python
    /usr/bin/python
    
    $ file /usr/bin/python
    /usr/bin/python: symbolic link to python-exec2c
    
    $ file /usr/bin/python-exec2c
    /usr/bin/python-exec2c: ELF 64-bit LSB pie executable, x86-64, version 1 
(SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for 
GNU/Linux 3.2.0, stripped

    $ set | grep -i py

    $ python
    Python 3.6.10 (default, Feb 26 2020, 16:43:12)
    [GCC 9.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sys
    >>> sys.path
    ['', '/usr/lib64/python36.zip', '/usr/lib64/python3.6', 
'/usr/lib64/python3.6/lib-dynload',
    '/home/grante/.local/lib64/python3.6/site-packages', 
'/usr/lib64/python3.6/site-packages',
    '/usr/lib64/python3.6/site-packages/pygdbmi-0.8.4.0-py3.6.egg',
    '/usr/lib64/python3.6/site-packages/pcpp-1.1.1-py3.6.egg',
    '/usr/lib64/python3.6/site-packages/pytz-2019.2-py3.6.egg',
    '/usr/lib64/python3.6/site-packages/python_dateutil-2.8.0-py3.6.egg']
    >>>

The entry for /home/grante/.local/lib64/python3.6/site-packages (where
pip --user installs things) is in my path.

-- 
Grant Edwards               grant.b.edwards        Yow! Remember, in 2039,
                                  at               MOUSSE & PASTA will
                              gmail.com            be available ONLY by
                                                   prescription!!


Reply via email to