Reputation: 466
I am getting confused with all the different Python-interpreters (CPython, PyPy, etc.). Does anyone know what python-interpreter is used for the standard-python on Windows? I can't find it on Official Python Website and when I type py --version
in the command prompt it just tells me the python version (which is 3.6.0). Any help would be appreciated.
Upvotes: 0
Views: 1020
Reputation: 16184
The most common interpreter, which you downloaded from https://www.python.org/, is CPython. However, this interpreter is no standard; just commonly used. Python as a language is defined by the syntax, not interpreter.
Upvotes: 2
Reputation: 31895
Based on the website link(python.org) you provided, if you install downloaded python from it, the interpreter is CPython, it is the most widely used implementation of python.
On windows machine, the python interpreter is usually installed in C:\Python36
, you can check it on the python shell by:
sys.executable A string giving the absolute path of the executable binary for the Python interpreter, on systems where this makes sense. If Python is unable to retrieve the real path to its executable, sys.executable will be an empty string or None.
import sys
print(sys.executable)
In my case, it returns /Users/hzhang/.virtualenvs/env-3.5/bin/python
Upvotes: 2
Reputation: 251363
What you get from python.org is CPython.
You can also see the implementation from within Python by doing import platform
and then platform.python_implementation()
. So you could get it from the command line with:
py -c "import platform; print(platform.python_implementation())"
Upvotes: 2