To check the version of one's Python's Software version, one should use the following code in command prompt:

python -V

Reference: http://docs.python.org/using/cmdline.html#generic-options

Answer from theglauber on Stack Overflow
🌐
Python
devguide.python.org › versions
Status of Python versions
May 27, 2026 - Python releases go through five phases, as described in PEP 602. Release managers can adjust specific dates as needed. ... Before the first beta, the next full release can accept new features, bug fixes, and security fixes. ... After the first beta, no new features can go in, but feature fixes (including significant changes to new features), bug fixes, and security fixes are accepted for the upcoming feature release. ... Once a version has been fully released, bug fixes and security fixes are accepted.
🌐
Python
python.org › downloads
Download Python | Python.org
Python versions before 3.14 are also signed using OpenPGP private keys of the respective release manager. In this case, verification through the release manager's public key is also possible.
Discussions

What's the most used python version in research?
General rule of thumb - unless there’s specific compatibility with an old package you need (there almost always isn’t) - then there’s no reason to not use the latest Python version. If you’re a beginner it’s exceedingly unlikely you’re going to have to deal with that, so just use the latest version. More on reddit.com
🌐 r/learnpython
21
14
July 9, 2024
setuptools - Standard way to embed version into Python package? - Stack Overflow
Is there a standard way to associate version string with a Python package in such way that I could do the following? import foo print(foo.version) I would imagine there's some way to retrieve that... More on stackoverflow.com
🌐 stackoverflow.com
Which version of python should I download?
whatever version ... you need to build something you want (i.e. depending on a library) your course is using 1 or 2 versions below current release (3.10, 3.11) for higher compatibility (although alot of libraries should work by now) just get the most recent version for the shiny stuff More on reddit.com
🌐 r/learnpython
13
3
June 25, 2024
Please make `package.__version__` go away! - Packaging - Discussions on Python.org
On reading dynamic-versioning-at-build-time I came across the packaging guide’s suggested approach to keeping the package’s .__version__ attribute in sync with that specified in the pyproject.toml/setup.cfg/setup.py. To me, this raises a question of why are we still encouraging the setting ... More on discuss.python.org
🌐 discuss.python.org
12
July 17, 2024
People also ask

What is the latest Python version?
The latest stable release is Python 3.14.5, which was released on May 10, 2026. While version 3.14 is the most current, many developers still use Python 3.13 or 3.12 for production environments to ensure all their third-party libraries and tools are fully compatible.
🌐
superops.com
superops.com › home › blog › how to check python version on windows, macos, and linux
How to Check Python Version: Windows, macOS & Linux Guide
What is a Python version file?
A Python version file is a simple text file that specifies which Python version should be used for a particular project or directory. The file contains a single line with a Python version specification like 3.13.1. It is usually used by Python version managers like pyenv, uv, and others to automatically select and activate the specified Python version whenever you work in that directory.
🌐
superops.com
superops.com › home › blog › how to check python version on windows, macos, and linux
How to Check Python Version: Windows, macOS & Linux Guide
🌐
Mostly Python
mostlypython.com › updating-python
Updating Python
August 7, 2025 - At the time of this writing, that's Python 3.13.5. I want to easily be able to create virtual environments based on any version of Python I might need, from older versions like Python 3.8 to release candidates like Python 3.14.0rc1.
🌐
DataCamp
datacamp.com › tutorial › check-python-version
How to Check Python Version: Windows, macOS, and Linux | DataCamp
January 28, 2026 - On Windows, this command may not work unless Python was installed with python3 explicitly added. This command is a shorthand version of python --version.
Find elsewhere
🌐
SuperOps
superops.com › home › blog › how to check python version on windows, macos, and linux
How to Check Python Version: Windows, macOS & Linux Guide
3 days ago - Learn How to check Python version on Windows, macOS, and Linux instantly. Get the exact terminal commands for python version, python3, and virtual environments.
🌐
Wikipedia
en.wikipedia.org › wiki › History_of_Python
History of Python - Wikipedia
1 week ago - Python 3.0, a major, backwards-incompatible release, was released on December 3, 2008 after a long period of testing. Many of its major features were also backported to the backwards-compatible Python versions 2.6 and 2.7 until support for Python 2 finally ceased at the beginning of 2020.
🌐
Reddit
reddit.com › r/learnpython › what's the most used python version in research?
r/learnpython on Reddit: What's the most used python version in research?
July 9, 2024 -

I'm writing a program for research and I heard making a virtual environment is a good practice, and since some packages have issue with python versions (I've encountered that only once on a very niche library) I'm wondering which version would be the "best practice" to use

Top answer
1 of 16
212

Not directly an answer to your question, but you should consider naming it __version__, not version.

This is almost a quasi-standard. Many modules in the standard library use __version__, and this is also used in lots of 3rd-party modules, so it's the quasi-standard.

Usually, __version__ is a string, but sometimes it's also a float or tuple.

As mentioned by S.Lott (Thank you!), PEP 8 says it explicitly:

Module Level Dunder Names

Module level "dunders" (i.e. names with two leading and two trailing underscores) such as __all__, __author__, __version__, etc. should be placed after the module docstring but before any import statements except from __future__ imports.

You should also make sure that the version number conforms to the format described in PEP 440 (PEP 386 a previous version of this standard).

2 of 16
178

I use a single _version.py file as the "once cannonical place" to store version information:

  1. It provides a __version__ attribute.

  2. It provides the standard metadata version. Therefore it will be detected by pkg_resources or other tools that parse the package metadata (EGG-INFO and/or PKG-INFO, PEP 0345).

  3. It doesn't import your package (or anything else) when building your package, which can cause problems in some situations. (See the comments below about what problems this can cause.)

  4. There is only one place that the version number is written down, so there is only one place to change it when the version number changes, and there is less chance of inconsistent versions.

Here is how it works: the "one canonical place" to store the version number is a .py file, named "_version.py" which is in your Python package, for example in myniftyapp/_version.py. This file is a Python module, but your setup.py doesn't import it! (That would defeat feature 3.) Instead your setup.py knows that the contents of this file is very simple, something like:

Copy__version__ = "3.6.5"

And so your setup.py opens the file and parses it, with code like:

Copyimport re
VERSIONFILE="myniftyapp/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = '\"['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
    verstr = mo.group(1)
else:
    raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))

Then your setup.py passes that string as the value of the "version" argument to setup(), thus satisfying feature 2.

To satisfy feature 1, you can have your package (at run-time, not at setup time!) import the _version file from myniftyapp/__init__.py like this:

Copyfrom _version import __version__

Here is an example of this technique that I've been using for years.

The code in that example is a bit more complicated, but the simplified example that I wrote into this comment should be a complete implementation.

Here is example code of importing the version.

If you see anything wrong with this approach, please let me know.

🌐
Python.org
discuss.python.org › packaging
Please make `package.__version__` go away! - Packaging - Discussions on Python.org
July 17, 2024 - On reading dynamic-versioning-at-build-time I came across the packaging guide’s suggested approach to keeping the package’s .__version__ attribute in sync with that specified in the pyproject.toml/setup.cfg/setup.py. To …
🌐
freeCodeCamp
freecodecamp.org › news › check-python-version-how-to-check-py-in-mac-windows-and-linux
Check Python Version – How to Check Py in Mac, Windows, and Linux
July 7, 2023 - This command will display the path of the Python executable file. By default, Python is installed in the "C:\PythonXX" directory, where "XX" represents the version number. If the command doesn't return any result, it means Python is not installed ...
🌐
PyDevTools
pydevtools.com › handbook › explanation › what-is-a-python-version-file
What is a .python-version file? | pydevtools
April 7, 2026 - A .python-version file is a simple text file that specifies which Python version should be used for a particular project or directory.
🌐
Reddit
reddit.com › r/python › how do i check my python version using command line.?
r/Python on Reddit: How do i check my Python Version Using Command Line.?
October 21, 2018 -

Evening r/Python

The reason for this post is because i am having trouble checking my Python version using the command prompt. Am originally a Mac user, so not sure if the PC transition is what has me confused. Anyways, i know i have Python Version 3.7 installed in my system. However, when i run the python --version command line in both the regular command prompt and administrator command prompt, i get THIS error message.

How come.? This is not really about what version I'm running, as it is about me trying to use the pip install command to install packages. But i figured start at the begging so if command prompt won't even recognize my python installation, why first waste my time trying to figure out why is wont recognize the pip call.

Anyhow, any comments/suggestions would be greatly appreciated. Thank you in advance and good day.! Cheers.! :)

🌐
End of Life Date
endoflife.date › python
Python | endoflife.date
2 weeks ago - python --version # or alternatively python3 --version
🌐
Reddit
reddit.com › r/python › summary of major python changes between versions
r/Python on Reddit: Summary of major Python changes between versions
February 2, 2024 -

TLDR: I've thrown together a one "page" reference documenting the major changes to between Python versions.

I've spent a fair amount of time recently upgrading some old code-bases and would have found it helpful to have a one page summary of changes between versions. I couldn't find one via Google so decided to create one for myself.

It might be useful for others so sharing it ☺️

🌐
Pypa
packaging.pypa.io › en › stable › version.html
Version Handling - Packaging
A Version instance is comparison aware and can be compared and sorted using the standard Python interfaces.