About Using Multiple Python Versions
First of all, install pyenv using https://github.com/pyenv/pyenv-installer:
$ curl https://pyenv.run | bash
Append these lines to ~/.zshrc
or ~/.bash_profile
depending on your shell:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
List available Python versions for installation with:
$ pyenv install --list
To install Python 3.10.2 you would:
$ pyenv install 3.10.2
It will be installed to ~/.pyenv/versions/
.
To create a new virtual environment with Python 3.10.2 you would run this in a directory where you want your venv
directory:
$ ~/.pyenv/versions/3.10.2/bin/python -m venv venv
Analogously you can set up other Python versions.
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You