TThis is a shell script for Ubuntu systems. It works for both Linux natives and WSL users. Here we make an alias for the python executors, giving the user the choice of which version of python he can choose to change his executor.
-
Make sure you have Bash installed on your machine.
-
Download the
alias_pyVersion.shfile to your machine. -
Give the
alias_pyVersion.shfile execute permissions using the following command:chmod +x alias_pyVersion.sh. -
Run the script using the following command:
source alias_pyVersion.sh.
Available Python versions:
1: python2.7
2: python3.10
3: python3.7
4: python3.8
Enter the number corresponding to the Python version you want to use for the 'py' alias: 2
Successfully configured 'py' alias for Python python3.10.
Concluded.