momo momo - 1 year ago 90
Python Question

Preinstalled python on mac a cpython?

As the title says,I want to know if the python which comes pre installed on mac is cpython. I mean logic says it probably is,but I couldn't find it being written anywhere officially so wanted to confirm.

I want to download a few things and for compatibility they require the installed python to be cpython/iron python.

Answer Source

With command Python --version you get the information like that:

[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin

It is almost affirmative that it is cpython with gcc as compiler.

An alternative(which is more official) is to check with python code:

import platform

The function python_implementation:

Returns a string identifying the Python implementation. Possible return values are: ‘CPython’, ‘IronPython’, ‘Jython’, ‘PyPy’

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download