Re: link to venv python sees a different sys.path

2020-03-12 Thread Dieter Maurer
Robin Becker wrote at 2020-3-12 10:25 +: > ... >I want many different versions of python all in one place to use for testing. I contribute to the `zopefoundation` projects. They, too, have a need to test with many different Python versions -- and use "tox" for it. Maybe, "tox" can also help so

Re: link to venv python sees a different sys.path

2020-03-12 Thread Robin Becker
On 12/03/2020 09:19, Dieter Maurer wrote: Let me try again: When you start "python", its "site" module extends "sys.path" to include an appropriate "site-packages". For this, it uses a heuristic based on the path with which you have called the interpreter: i.e. it tries to use dirname(

Re: link to venv python sees a different sys.path

2020-03-12 Thread Dieter Maurer
Robin Becker wrote at 2020-3-12 09:07 +: >On 11/03/2020 17:24, Dieter Maurer wrote: >> Robin Becker wrote at 2020-3-11 15:26 +: >>> 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

Re: link to venv python sees a different sys.path

2020-03-12 Thread Robin Becker
On 11/03/2020 17:24, Dieter Maurer wrote: Robin Becker wrote at 2020-3-11 15:26 +: 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 ... so the linked versio

Re: link to venv python sees a different sys.path

2020-03-11 Thread Dieter Maurer
Robin Becker wrote at 2020-3-11 15:26 +: >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__/3

Re: link to venv python sees a different sys.path

2020-03-11 Thread Jon Ribbens via Python-list
On 2020-03-11, Robin Becker wrote: > I'm trying to understand why python 3.8.2 venv behaves differently > when it is executed va a link Because site.py contains a function called venv() which looks up the path of the executed python binary, and searches for the virtual environment relative to tha

link to venv python sees a different sys.path

2020-03-11 Thread Robin Becker
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@e