A adoption of Docker to set local environments to use different python versions.
Installation
Arch
sudo pacman -S pyenv
- Then
pyenv init
. follow the instructions
Fedora Linux
sudo yum install zlib zlib-devel bzip2-devel openssl-devel sqlite-devel readline-devel -y
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
Utilization
Installing Different Python Version
pyenv install 3.10.4
Listing Versions
pyenv versions
Using Different Python Version
for global shell:
pyenv global 3.10.4
for current folder:
pyenv local 3.10.4
Uninstall Python Version
pyenv uninstall 3.10.4