Step 1:
First of all, you have to download both python 2 and 3 setup files.I am using Windows machine and so I have downloaded both python 2.7.12 and python 3.5 which are the latest version of python 2 and 3 respectively.(I recommend you to download 64-bit installer for both versions)
Step 2:
First, install python 2 and then python 3.Before installing python 3, make sure to check the box of Add python 3.5 to path as shown below.How to open both python shell in command prompt :
If you want to use python shell in command prompt, you have to type the following as you can see in image below.How to open both python file in specified python version:
If you want to open a file automatically by double clicking the .py file then you should specify which python version you are using.Then you should type the first line of python program as #!python2 and #!python3 for python 2 and python 3 as shown below.py2.py |
py3.py |
Hope this helps :)
Comments
Post a Comment