Posts: 4,653
Threads: 1,496
Joined: Sep 2016
my laptop (ubuntu 16.04.5 upgraded to be xubuntu) has a bunch of subdirectories with names like "dist-package" and "site-package" which have
parents with names like "python" and "python-{version}" for various subversions of 2 and 3. does anyone know what these are, what they are for, and what they are supposed to have?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
where to put locally written code so that it does not get mixed up with anything being installed? is there a way to have Python make use of yet-another (3rd) such subdirectory name (for example "host-packages")? environment variable PYTHONPATH?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
i've got 3.6.8, now, so i changed the 3.5 to 3.6. now i have:
/etc/python3.6/sitecustomize.py:
1 2 3 4 5 6 7 8 9 10 11 |
try :
import apport_python_hook
except ImportError:
pass
else :
apport_python_hook.install()
import site
for a in ( '/usr/local' , '/usr/host' ):
for b in ( 'dist-packages' , 'host-packages' , 'site-packages' ):
site.addsitedir( f '{a}/lib/python3.6/{b}' )
|
python3 still works. at least i didn't break it, yet.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,653
Threads: 1,496
Joined: Sep 2016
Jul-13-2019, 10:22 PM
(This post was last modified: Jul-13-2019, 10:27 PM by Skaperen.)
you suggested 2 files to look at. i updated them for 3.6. only 1 of them existed so i modified it instead of adding a new one.
the reason is because i wanted a directory added that was different than the common ones. i chose to name it "
host" because the name is the same length as the other two, and it fits in with other customizing i am doing in
/usr/host (same subdirectories as
/usr/local has).
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.