0

How do I tell which distribution I am using? E.g. my version line says:

3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 03:37:03) [MSC v.1900 64 bit (AMD64)]

Is that CPython? PyPy? Jython? etc...

Richard Keene
  • 398
  • 3
  • 14
  • Possible duplicate of [Can I detect if my code is running on cPython or Jython?](https://stackoverflow.com/questions/1103487/can-i-detect-if-my-code-is-running-on-cpython-or-jython) – UnholySheep Dec 11 '18 at 17:29

1 Answers1

1

You can use the platform module on python versions above 2.6.

>>> import platform
>>> platform.python_implementation()

This will return 'CPython' for the C implementation, 'IronPython' for IronPython, 'Jython' for the Java implementation, and 'PyPy' for the PyPy version.

akrantz01
  • 628
  • 1
  • 9
  • 19