MeshWorld India LogoMeshWorld.

Get Python Version via Command Line

Listen to ArticleAI Speech
~2 min read narration
100%
Get Python Version via Command Line

Python is one of the most popular programming language with huge community & large organization supporting, using it. According to PYPL PopularitY of Programming Language, Python is ranked 1st again in 2021, recently analyzed in June 2021.

Python accepts multiple option on command line and one such option provides version that is being used.

In this article, we use --version option to retrieve current Python version being used by your operating system using the command line. This can be useful while developing or installing applications that require a specific version of Python.

Get Python Version with --version option

It display version of Python supported by your system. If you’re using Python 2 then you need to use python instead of python3 that is being used for Python 3.

Syntax

python3 --version
Python 3.8.5

Python follows semantic versioning. The releases are versioned in the following manner:

MAJOR.MINOR.PATCH

As per the output of Python 3.8.5, 3 is a major version, 6 is a minor version, and 8 is a patch version.

  • MAJOR: Python has two major versions and both of them are not compatible, Python 2 and Python 3. For example, 3.6.7, 3.8.0, and 3.8.5 are release of the Python 3 major version.
  • MINOR: These releases includes new features and functions. Release such as 3.8.3, 3.8.4, and 3.8.5 are all part of the Python 3.8 minor version.
  • Patch: The new patch release contain bug fixes and improvements.

You can use python3 command to enter interactive mode and in first line python version will be specified.

Happy 😄 coding

With ❤️ from 🇮🇳

Reader Quality Feedback

Did this technical guide help solve your problem?

Suggest Errata ($0)
Vishnu
Primary Author

Vishnu

Founder & Principal Architect at MeshWorld. Senior engineer and instructor specializing in AI agent systems, scalable web architecture, and modern development workflows.

Explore Author Archive
Compute Fuel & Open Testbed
100% Independent & Verified

Fuel High-Density, Zero-Fluff Engineering Deep-Dives

Every guide on MeshWorld is validated on physical Linux nodes and reproducible testbeds. If this article saved you hours of debugging or unblocked production, consider funding our next cluster run.

Weekly Dispatch

Join MeshWorld Dispatch

Get practical tutorials, system blueprints, and curated AI engineering notes straight to your inbox. No fluff, zero spam.

Zero spam. 1-click unsubscribe anytime.Prefer RSS?
Curated Continuations

Up Next in This Domain.

Browse Full Archive