Search code examples
python-3.xpython-2.7path-variables

getting the wrong version of python


I have installed python 3.6 on my laptop but when I run the version command I get the 2.7 version. I have changed the path variable and still get the same result and the funny thing is that I don't even have python 2.7 installed on my laptop.

here is the image path variable and version also when I run python in cmd I get the error run error any help will be much appreciated


Solution

  • Typing:

    where -a python
    

    shows you the order in which the command

    python 
    

    is found on your path.

    Use:

    which -a python
    

    on unix-like systems such as Linux or MacOS X.