{"id":13658,"date":"2024-11-07T06:05:15","date_gmt":"2024-11-07T06:05:15","guid":{"rendered":"https:\/\/www.bodhost.com\/kb\/?p=13658"},"modified":"2026-02-26T14:02:09","modified_gmt":"2026-02-26T14:02:09","slug":"how-to-check-python-version-in-linux-windows","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/","title":{"rendered":"How to Check Python Version in Linux &#038; Windows"},"content":{"rendered":"<p>Python is a versatile programming language, popular among developers, data scientists, and researchers. Its simplicity and extensive libraries make it ideal for web development, data analysis, AI, and machine learning.<\/p>\n<h5><strong>Why Check the Python Version?<\/strong><\/h5>\n<p>Checking your Python version ensures compatibility with libraries and projects. It helps avoid errors, makes sure you&#8217;re using the right version for development, and can help troubleshoot installation issues.<\/p>\n<h5><strong>How to Check Python Version<\/strong><\/h5>\n<p><strong>1. Using Command Line<\/strong><\/p>\n<pre class=\"enlighter-clipboard\">python --version\r\n# or\r\npython3 --version<\/pre>\n<p>This is the quickest way to check. Use `python3` if you specifically need to check Python 3.x version.<\/p>\n<p><strong>2. Using Python Shell<\/strong><\/p>\n<pre>import sys\r\nprint(sys.version) # Shows full version with build info\r\nprint(sys.version_info) # Shows version as structured tuple<\/pre>\n<p>This method gives you more detailed information, including build numbers and compilation details.<\/p>\n<p><strong>3. Windows-Specific Commands<\/strong><\/p>\n<pre>py --version # Shows default Python version\r\npy -0 # Lists ALL installed Python versions\r\npy -3 # Runs latest Python 3 version<\/pre>\n<p>The Python Launcher (`py`) in Windows makes it easy to manage multiple Python versions.<\/p>\n<p><strong>4. Check Installation Location<\/strong><\/p>\n<ul>\n<li class=\"whitespace-normal break-words\">Linux: <code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.3rem] px-1 py-px text-[0.9rem]\">which python3<\/code><\/li>\n<li class=\"whitespace-normal break-words\">Windows: <code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.3rem] px-1 py-px text-[0.9rem]\">where python<\/code><\/li>\n<\/ul>\n<p>These methods will help you quickly find the Python version on your system, whether you&#8217;re using Linux or Windows. Choose the method that works best for you to get the details you need.<\/p>\n<p>Read Also: <a href=\"https:\/\/www.bodhost.com\/kb\/how-to-install-python-3-on-ubuntu-20-04-or-22-04\/\" target=\"_blank\" rel=\"noopener\">How to Install Python 3 on Ubuntu 20.04 or 22.04<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python is a versatile programming language, popular among developers, data scientists, and researchers. Its simplicity and extensive libraries make it ideal for web development, data analysis, AI, and machine learning. Why Check the Python Version? Checking your Python version ensures compatibility with libraries and projects. It helps avoid errors, makes sure you&#8217;re using the right [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[837],"tags":[1579],"class_list":["post-13658","post","type-post","status-publish","format-standard","hentry","category-tutorial","tag-check-python-version-in-linux-windows"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Check Python Version in Linux &amp; Windows | bodHOST<\/title>\n<meta name=\"description\" content=\"Learn how to check the Python version on Linux and Windows using simple commands. Find version details through the command line.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Check Python Version in Linux &amp; Windows | bodHOST\" \/>\n<meta property=\"og:description\" content=\"Learn how to check the Python version on Linux and Windows using simple commands. Find version details through the command line.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-07T06:05:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:02:09+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Check-Python-Version-in-Linux-Windows-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Paul Lopez\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Check-Python-Version-in-Linux-Windows-2.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul Lopez\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-check-python-version-in-linux-windows\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-check-python-version-in-linux-windows\\\/\"},\"author\":{\"name\":\"Paul Lopez\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/566ccff9a2fae4af852be8097b179813\"},\"headline\":\"How to Check Python Version in Linux &#038; Windows\",\"datePublished\":\"2024-11-07T06:05:15+00:00\",\"dateModified\":\"2026-02-26T14:02:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-check-python-version-in-linux-windows\\\/\"},\"wordCount\":179,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"Check Python Version in Linux &amp; Windows\"],\"articleSection\":[\"Tutorial\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-check-python-version-in-linux-windows\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-check-python-version-in-linux-windows\\\/\",\"name\":\"How to Check Python Version in Linux & Windows | bodHOST\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2024-11-07T06:05:15+00:00\",\"dateModified\":\"2026-02-26T14:02:09+00:00\",\"description\":\"Learn how to check the Python version on Linux and Windows using simple commands. Find version details through the command line.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-check-python-version-in-linux-windows\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-check-python-version-in-linux-windows\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-check-python-version-in-linux-windows\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Tutorial\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/tutorial\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Check Python Version in Linux &#038; Windows\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/566ccff9a2fae4af852be8097b179813\",\"name\":\"Paul Lopez\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g\",\"caption\":\"Paul Lopez\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/paullopez\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Check Python Version in Linux & Windows | bodHOST","description":"Learn how to check the Python version on Linux and Windows using simple commands. Find version details through the command line.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/","og_locale":"en_US","og_type":"article","og_title":"How to Check Python Version in Linux & Windows | bodHOST","og_description":"Learn how to check the Python version on Linux and Windows using simple commands. Find version details through the command line.","og_url":"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2024-11-07T06:05:15+00:00","article_modified_time":"2026-02-26T14:02:09+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Check-Python-Version-in-Linux-Windows-2.png","type":"image\/png"}],"author":"Paul Lopez","twitter_card":"summary_large_image","twitter_image":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2024\/11\/How-to-Check-Python-Version-in-Linux-Windows-2.png","twitter_misc":{"Written by":"Paul Lopez","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/"},"author":{"name":"Paul Lopez","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/566ccff9a2fae4af852be8097b179813"},"headline":"How to Check Python Version in Linux &#038; Windows","datePublished":"2024-11-07T06:05:15+00:00","dateModified":"2026-02-26T14:02:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/"},"wordCount":179,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["Check Python Version in Linux &amp; Windows"],"articleSection":["Tutorial"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/","url":"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/","name":"How to Check Python Version in Linux & Windows | bodHOST","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2024-11-07T06:05:15+00:00","dateModified":"2026-02-26T14:02:09+00:00","description":"Learn how to check the Python version on Linux and Windows using simple commands. Find version details through the command line.","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/how-to-check-python-version-in-linux-windows\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Tutorial","item":"https:\/\/www.bodhost.com\/kb\/category\/tutorial\/"},{"@type":"ListItem","position":2,"name":"How to Check Python Version in Linux &#038; Windows"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/566ccff9a2fae4af852be8097b179813","name":"Paul Lopez","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c63d9f5400cd5ef87b481a24b2c1a4fb89f1674b6391325326cf13f1e735dff8?s=96&d=mm&r=g","caption":"Paul Lopez"},"url":"https:\/\/www.bodhost.com\/kb\/author\/paullopez\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13658","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=13658"}],"version-history":[{"count":6,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13658\/revisions"}],"predecessor-version":[{"id":13664,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13658\/revisions\/13664"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=13658"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=13658"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=13658"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}