Search code examples
pythonmacososx-elcapitan

Python Version issue


I am very new to Python. But I install Python 3.5.0 from pkg file downloaded from python.org on my MAC (OS X El Capitan).

Issue is that when I go to Terminal and issue command

python -V

It shows me Python 2.7.10 why it is so and how can I remove that version


Solution

  • Every Linux(Most of them Actually) comes bundled with python 2.7.x. So that's why it is showing you version 2.7.10.

    Try running in terminal:

    python3
    

    You will get something like:

    Python 3.4.3 (default, Oct 14 2015, 20:28:29) 
    [GCC 4.8.4] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> 
    

    where 3.4.3 is the python version.

    same goes for python2.