How To Run Python 2 and Python 3 in same Windows and Also from git-bash


Most times we want to work on different version of Python in our Windows system. In the following video learn how to run both Python 2.7.x and Python 3.x in the same Windows 10 system.

Also learn how to easily run python from git-bash prompt.


For running python easily in git bash:
Add the following in file .bashrc(create if not available). alias python3='winpty /c/(Python 3.x folder path)/python.exe' alias python='winpty /c/(Python 2.x folder path)/python.exe' The .bashrc file will be in home folder in git bash.
Note: Type cd ~ , to go to your home folder. e.g. $ cd ~

Happy Learning!!


Python Testing course in Udemy link here.

No comments:

Post a Comment