Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: Python: ebuilds vs. pip3 install --user
Date: Wed, 11 Mar 2020 20:27:23
Message-Id: r4bhiv$366u$1@ciao.gmane.io
In Reply to: Re: [gentoo-user] Python: ebuilds vs. pip3 install --user by Marc Joliet
1 On 2020-03-11, Marc Joliet <marcec@×××.de> wrote:
2 > Am Mittwoch, 11. März 2020, 18:54:43 CET schrieb Grant Edwards:
3 >> [...]
4 >> Q: Under what conditions will having a second installation of a Python
5 >> library under .local cause problems?
6 >
7 > IIUC you shouldn't have any problems, simply because ~/.local/ is not part of
8 > the system python's module search path:
9 >
10 > % python3
11 > Python 3.6.10 (default, Feb 26 2020, 01:09:02)
12 > [GCC 9.2.0] on linux
13 > Type "help", "copyright", "credits" or "license" for more information.
14 >>>> import sys
15 >>>> sys.path
16 > ['', '/usr/lib64/python36.zip', '/usr/lib64/python3.6', '/usr/lib64/python3.6/
17 > lib-dynload', '/usr/lib64/python3.6/site-packages']
18
19 Except it is for me (and I don't know how it gets there):
20
21 $ which python
22 /usr/bin/python
23
24 $ file /usr/bin/python
25 /usr/bin/python: symbolic link to python-exec2c
26
27 $ file /usr/bin/python-exec2c
28 /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
29
30 $ set | grep -i py
31
32 $ python
33 Python 3.6.10 (default, Feb 26 2020, 16:43:12)
34 [GCC 9.2.0] on linux
35 Type "help", "copyright", "credits" or "license" for more information.
36 >>> import sys
37 >>> sys.path
38 ['', '/usr/lib64/python36.zip', '/usr/lib64/python3.6', '/usr/lib64/python3.6/lib-dynload',
39 '/home/grante/.local/lib64/python3.6/site-packages', '/usr/lib64/python3.6/site-packages',
40 '/usr/lib64/python3.6/site-packages/pygdbmi-0.8.4.0-py3.6.egg',
41 '/usr/lib64/python3.6/site-packages/pcpp-1.1.1-py3.6.egg',
42 '/usr/lib64/python3.6/site-packages/pytz-2019.2-py3.6.egg',
43 '/usr/lib64/python3.6/site-packages/python_dateutil-2.8.0-py3.6.egg']
44 >>>
45
46 The entry for /home/grante/.local/lib64/python3.6/site-packages (where
47 pip --user installs things) is in my path.
48
49 --
50 Grant Edwards grant.b.edwards Yow! Remember, in 2039,
51 at MOUSSE & PASTA will
52 gmail.com be available ONLY by
53 prescription!!

Replies

Subject Author
Re: [gentoo-user] Re: Python: ebuilds vs. pip3 install --user Marc Joliet <marcec@×××.de>