I'm trying to understand why python 3.8.2 venv behaves differently when it is 
executed va a link

Make the env
rptlab@everest:~/code/hg-repos
$ python38 -mvenv __py__/382v
rptlab@everest:~/code/hg-repos

make a link
$ ln -s ../__py__/382v/bin/python bin/python382v

the venv sys.path
rptlab@everest:~/code/hg-repos > $ __py__/382v/bin/python -c"import 
sys;print('\n'.join(sys.path))"

/home/rptlab/LOCAL/382/lib/python38.zip
/home/rptlab/LOCAL/382/lib/python3.8
/home/rptlab/LOCAL/382/lib/python3.8/lib-dynload
/home/rptlab/code/hg-repos/__py__/382v/lib/python3.8/site-packages
rptlab@everest:~/code/hg-repos

the linked python sys.path
$ bin/python382v -c"import sys;print('\n'.join(sys.path))"

/home/rptlab/LOCAL/382/lib/python38.zip
/home/rptlab/LOCAL/382/lib/python3.8
/home/rptlab/LOCAL/382/lib/python3.8/lib-dynload
/home/rptlab/LOCAL/382/lib/python3.8/site-packages
rptlab@everest:~/code/hg-repos
$

so the linked version of the venv python sees the base python site packages and 
not the expected venv site-packages.

Is there a way to make the link work properly.

This problem doesn't seem to occur with older virtualenv made environments.
--
Robin Becker
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to