Activating a virtual environment from inside a python script running in another virtual environment fails.
For example I have a 'script runner' application which has a set of scripts and their associated environments.
$ /usr/bin/python runner.py # running using an interpreter not managed by pyenv
pyenv-virtualenv: activate myenv
/home/matthew/.pyenv/versions/myenv/bin/python
$ python runner.py # running from a pyenv environment
/home/matthew/.pyenv/versions/3.9.9/envs/otherenv/bin/python # environment did not switch
Activating a virtual environment from inside a python script running in another virtual environment fails. For example I have a 'script runner' application which has a set of scripts and their associated environments.
Here is a minimal example of the problem:
output:
Details
pyenv --version == 2.2.2
pyenv virtualenv --version == pyenv-virtualenv 1.1.5 (python -m venv)
python --version == Python 3.9.9