Create Python virtual environments
While the software industry matures a number of release , versions are available. If you want to use multiple versions of Python on the same computer you can use Pyenv. In combination with virtualenv you can create a dynamic local Python development environment
Selecting the Python version you want.
- Install pyenv
- Use
pyenv install -l
to see the available versions -
Install the version you want
pyenv install 3.6.15
Create day-to-day virtual environments.
- Install
virtualenv
-
create the virtual environment
pyenv virtualenv 2.7.16 apps2
Activate virtual environments locally
-
Create the environment
pyenv virtualenv 3.7.4 rst2pdf-py3
-
Use pyenv local withing directory
cd ~/dev/rst2pdf pyenv local rst2pdf-py3