I use pyenv + direnv. If my project uses 3.10.3 I just add `layout pyenv 3.10.3` to my .envrc file. This creates a venv in the `.direnv` subdirectory. When I `cd` into the dir my environment is automatically configured to use the virtual environment and when I `cd` out the configuration is removed.
If you want to use poetry + direnv, that's also an option.
I've always found pyenv a bit complex to deal with. I've also encountered some bugs with a fresh debian install and pyenv. To put this in perspective, i'm not the sharpest knife in the drawer (not a programmer, not an adminsys).
I prefered alt install for a specific version (python3.3, python 3.X, etc. with associated pip) and virtualenv. Then doing `python3.X -m venv` i got what i need. VScode or pycharm can bind to it.
Recently i've tryed Fedora and they ship python versions compiled so you just need to use the package manager. It's easier and it deals with updates. I stick with that now (i'm migrating from deb to fedora for my servers).