PROGRAMMING:
How to Install and Manage Multiple Python Versions in WSL2
Nice and easy tutorials with step-by-step instructions

Summary:
This article installs and manages multiple python versions in Windows Subsystem for Linux 2. It downloads, installs, and configures Pyenv. It displays all the python versions and installs the latest versions. It sets the default version for the computer and current directory. It also creates the virtual environment using the default version in the current directory.
Table of Contents:
- Install the Pyenv Repository
- Install the Python Versions
- Set the Global Default Version
- Set the Local Default Version
- Create the Virtual Environment
Appendix:
- Tutorials: Artificial Intelligence Set Up
- Tutorials: Artificial Intelligence Course
- Tutorials: Artificial Intelligence Repositories
Install the Pyenv Repository:
This section downloads, installs and configures Pyenv.
# open powershell
1. press “⊞ windows”
2. enter “powershell” into the search bar
3. right-click "windows powershell"
4. click “run as administrator”# open wsl
wsl# update the source list and source list directory
sudo apt-get update --yes# install git to download repositories from GitHub
sudo apt-get install --yes git# install the pyenv dependencies
sudo apt-get install --yes libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libgdbm-dev lzma lzma-dev tcl-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev wget curl make build-essential python-openssl# download the pyenv repository to the home directory
git clone https://github.com/pyenv/pyenv.git ~/.pyenv# add pyenv to the bash configuration file
echo -e "\n\n# pyenv environment variables\nexport PYENV_ROOT=\"\$HOME/.pyenv\"\nexport PATH=\"\$PYENV_ROOT/bin:\$PATH\"\n\n# pyenv initialization\nif command -v pyenv 1>/dev/null 2>&1; then\n eval \"\$(pyenv init --path)\"\nfi\n\n" >> ~/.bashrc# restart wsl
exec $SHELLInstall the Python Versions:
This section displays all the python versions and installs the latest versions.
# view the available python versions
pyenv install --list# install python 3.5
pyenv install 3.5.4# install python 3.6
pyenv install 3.6.8# install python 3.7
pyenv install 3.7.9# install python 3.8
pyenv install 3.8.6# install python 3.9
pyenv install 3.9.0Set the Global Default Version:
This section sets the default version of python for the computer.
# set the default version
pyenv global 3.8.6# check the default version
python --version# check the executable file
which pythonSet the Local Default Version:
This section sets the default version of python for the current directory.
# open the home directory
cd $HOME# make temporary directory
mkdir temporary# open the temporary directory
cd temporary# set the default version for the temporary directory
pyenv local python3.6.8# notice the default version has changed
python --version# notice the executable file has changed
which pythonCreate the Virtual Environment:
This section creates the virtual environment using the default version.
# create the virtual environment using the default version
python -m venv venv36# activate the virtual environment
source ./venv36/bin/activate# notice the default version is the same
python --version# notice the different executable file
which python# deactivate the virtual environment
deactivate“Lastly, remember to subscribe and hold down the clap button to get regular updates and help out.”
Appendix:
This blog exists to provide complete solutions, answer your questions, and accelerate your progress related to artificial intelligence. It has everything you need to set up your computer and complete the first half of the fastai course. It will expose you to state-of-the-art repositories in the subfields of artificial intelligence. It will also cover the second half of the fastai course.
Tutorials: Artificial Intelligence Set Up
This section provides everything that’s required to set up your computer.
# linux
01. install and manage multiple python versions
02. install the nvidia cuda driver, toolkit, cudnn, and tensorrt
03. install the jupyter notebook server
04. install virtual environments in jupyter notebook
05. install the python environment for ai and machine learning
06. install the fastai course requirements# wsl 2
01. install windows subsystem for linux 2
02. install and manage multiple python versions
03. install the nvidia cuda driver, toolkit, cudnn, and tensorrt
04. install the jupyter notebook home and public server
05. install virtual environments in jupyter notebook
06. install the python environment for ai and machine learning
07. install ubuntu desktop with a graphical user interface
08. install the fastai course requirements# windows 10
01. install and manage multiple python versions
02. install the nvidia cuda driver, toolkit, cudnn, and tensorrt
03. install the jupyter notebook home and public server
04. install virtual environments in jupyter notebook
05. install the programming environment for ai and machine learning# mac
01. install and manage multiple python versions
02. install the jupyter notebook server
03. install virtual environments in jupyter notebook
04. install the python environment for ai and machine learning
05. install the fastai course requirementsTutorials: Artificial Intelligence Course
This section contains answers to the questionnaire at the end of each lesson.
# fastai course
01. chapter 1: your deep learning journey q&a
02. chapter 2: from model to production q&a
03. chapter 3: data ethics q&a
04. chapter 4: under the hood: training a digit classifier q&a
05. chapter 5: image classification q&a
06. chapter 6: other computer vision problems q&a
07. chapter 7: training a state-of-the-art model q&a
08. chapter 8: collaborative filtering deep dive q&aTutorials: Artificial Intelligence Repositories
This section contains state-of-the-art repositories in the different subfields.
# repositories related to audio
01. raise audio quality using nu-wave
02. change voices using maskcyclegan-vc
03. clone voices using real-time-voice-cloning toolbox# repositories related to images
01. achieve 90% accuracy using facedetection-dsfd





