-2

I have installed python version Python 3.7.8 and added it to path variables. However when i type python in the cmd i get python 2.6

enter image description here

If you see the below image, python 3.7 is added to the path variable! enter image description here

How can i open python 3.7 from cmd instead of 2.6?

Khaled
  • 555
  • 1
  • 6
  • 26
  • 3
    command is python3 – Rishabh Kumar Feb 10 '21 at 08:56
  • 2
    Do you really need also python2.6? Just uninstall both than clean install python3 (preferably the latest version) – buran Feb 10 '21 at 09:00
  • On windows, to access `python 3` use `py -3` – mousetail Feb 10 '21 at 09:00
  • the environment variable ``PATH`` is evaluated left-to-right. If your Python 2.x bin folder is found first, the ``python.exe`` will be started from there. So either make sure to add your Python 3 path to the start of ``PATH`` or make sure to remove your Python 2 path from ``PATH``. Simply type ``PATH`` into your console to check its contents. – Mike Scotty Feb 10 '21 at 09:05

1 Answers1

2

for python 2.x use py -2.x or -2 for latest 2.x for python 3.x use py -3.x or -3 for latest 3.x

darkstar
  • 71
  • 3