With Poetry, to change an underlying Python version (for testing, etc.) and create a new virtualenv on top of that, use poetry env use /PATH/TO/VERSION/BINARY. For pyenv, this will be poetry env use ~/.pyenv/versions/x.y.z/bin/python3. This will create and activate a new virtual environment, but it won’t show up automatically in the shell. To make it show up, get the full path of the activated virtual environment with poetry env list --full-path, then use that with source /VIRTUALENV/PATH/bin/activate.