If you are confused about how to setup different python environments in your system, here is how I do it.
pyenv install <version>
-> installs a new version of pythonpyenv global <version>
-> sets an installed version as global python versionpyenv local <version>
-> sets an installed version as local(to the directory) python version. Notice a .python-version
file generated.python -m venv .venv
-> create a new virtual environmentsource .venv/bin/activate
-> activate created virtual environment