Sick Gaming
[Tut] Check Python Version from Command Line and in Script - Printable Version

+- Sick Gaming (https://www.sickgaming.net)
+-- Forum: Programming (https://www.sickgaming.net/forum-76.html)
+--- Forum: Python (https://www.sickgaming.net/forum-83.html)
+--- Thread: [Tut] Check Python Version from Command Line and in Script (/thread-101289.html)



[Tut] Check Python Version from Command Line and in Script - xSicKxBot - 08-24-2023

[Tut] Check Python Version from Command Line and in Script

<div>
<div class="kk-star-ratings kksr-auto kksr-align-left kksr-valign-top" data-payload='{&quot;align&quot;:&quot;left&quot;,&quot;id&quot;:&quot;1646575&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;top&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;1&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;5&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;Rate this post&quot;,&quot;legend&quot;:&quot;5\/5 - (1 vote)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;Check Python Version from Command Line and in Script&quot;,&quot;width&quot;:&quot;142.5&quot;,&quot;_legend&quot;:&quot;{score}\/{best} - ({count} {votes})&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>
<div class="kksr-stars">
<div class="kksr-stars-inactive">
<div class="kksr-star" data-star="1" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" data-star="2" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" data-star="3" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" data-star="4" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" data-star="5" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
</p></div>
<div class="kksr-stars-active" style="width: 142.5px;">
<div class="kksr-star" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
<div class="kksr-star" style="padding-right: 5px">
<div class="kksr-icon" style="width: 24px; height: 24px;"></div>
</p></div>
</p></div>
</div>
<div class="kksr-legend" style="font-size: 19.2px;"> 5/5 – (1 vote) </div>
</p></div>
<h2 class="wp-block-heading">Check Python Version from Command Line</h2>
<p>Knowing your Python version is vital for running programs that may be incompatible with a certain version. <a href="https://blog.finxter.com/how-to-check-your-python-version/">Checking the Python version</a> from the command line is simple and can be done using your operating system’s built-in tools.</p>
<h3 class="wp-block-heading">Windows Command Prompt</h3>
<p>In Windows, you can use PowerShell to check your Python version. Open PowerShell by pressing <code>Win+R</code>, typing <code>powershell</code>, and then pressing <code>Enter</code>. Once PowerShell is open, type the following command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python --version
</pre>
<p>This command will return the Python version installed on your Windows system. If you have both Python 2 and Python 3 installed, you can use the following command to check the Python 3 version:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python3 --version
</pre>
<h3 class="wp-block-heading">macOS Terminal</h3>
<p>To check the Python version in macOS, open the Terminal by going to <code>Finder</code>, clicking on <code>Applications</code>, and then navigating to <code>Utilities &gt; Terminal</code>. Once the Terminal is open, type the following command to check your Python version:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python --version
</pre>
<p>Alternatively, if you have Python 3 installed, use the following command to check the Python 3 version:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python3 --version
</pre>
<h3 class="wp-block-heading">Linux Terminal</h3>
<p>In Linux, open a terminal window and type the following command to check your Python version:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python --version
</pre>
<p>For Python 3, use the following command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python3 --version
</pre>
<p>It is also possible to <a href="https://blog.finxter.com/how-to-check-your-python-version/">check the Python version within a script</a> using the <code>sys</code> module:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys
print(sys.version)
</pre>
<p>This code snippet will print the Python version currently being used to run the script. It can be helpful in identifying version-related issues when debugging your code.</p>
<h2 class="wp-block-heading">Check Python Version in Script</h2>
<h3 class="wp-block-heading">Using Sys Module</h3>
<figure class="wp-block-image size-full"><img decoding="async" fetchpriority="high" width="830" height="336" src="https://blog.finxter.com/wp-content/uploads/2023/08/image-103.png" alt="" class="wp-image-1646576" srcset="https://blog.finxter.com/wp-content/uploads/2023/08/image-103.png 830w, https://blog.finxter.com/wp-content/uploads/2023/08/image-103-300x121.png 300w, https://blog.finxter.com/wp-content/uploads/2023/08/image-103-768x311.png 768w" sizes="(max-width: 830px) 100vw, 830px" /></figure>
<p class="has-global-color-8-background-color has-background">The <code>sys</code> module allows you to access your Python version within a script. To obtain the version, simply import the <code>sys</code> module and use the <code><a href="https://blog.finxter.com/check-ubuntu-python-version/">sys.version_info</a></code> attribute. This attribute returns a tuple containing the major, minor, and micro version numbers, as well as the release level and serial number. </p>
<p>Here is a quick example:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys
version_info = sys.version_info
print(f"Python version: {version_info.major}.{version_info.minor}.{version_info.micro}")
# Output: Python version: 3.9.5</pre>
<p>You can also use <code>sys.version</code> to get the Python version as a string, which includes additional information about the build. For example:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys
version = sys.version
print(f"Python version: {version.split()[0]}")
</pre>
<p>These methods work for both <a href="https://blog.finxter.com/python-check-version-of-package-with-pip/">Python 2</a> and <a href="https://blog.finxter.com/how-to-check-your-tensorflow-version-in-colab/">Python 3</a>.</p>
<h3 class="wp-block-heading">Using Platform Module</h3>
<div class="wp-block-image">
<figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="920" height="167" src="https://blog.finxter.com/wp-content/uploads/2023/08/image-104.png" alt="" class="wp-image-1646577" srcset="https://blog.finxter.com/wp-content/uploads/2023/08/image-104.png 920w, https://blog.finxter.com/wp-content/uploads/2023/08/image-104-300x54.png 300w, https://blog.finxter.com/wp-content/uploads/2023/08/image-104-768x139.png 768w" sizes="(max-width: 920px) 100vw, 920px" /></figure>
</div>
<p class="has-global-color-8-background-color has-background">Another way to check the Python version in a script is using the <code>platform</code> module. The <code>platform.python_version()</code> function returns the version as a string, while <code>platform.python_version_tuple()</code> returns it as a tuple. </p>
<p>Here’s an example of how to use these functions:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import platform
version = platform.python_version()
version_tuple = platform.python_version_tuple()
print(f"Python version: {version}")
print(f"Python version (tuple): {version_tuple}")
</pre>
<p>Both the <code>sys</code> and <code>platform</code> methods allow you to easily check your <a href="https://blog.finxter.com/how-to-check-python-version-in-jupyter-notebook/">python version</a> in your scripts. By utilizing these modules, you can ensure that your script is running on the correct version of Python, or even tailor your script to work with multiple versions.</p>
<h2 class="wp-block-heading">Python Version Components</h2>
<p>Python versions are composed of several components that help developers understand the evolution of the language and maintain their projects accordingly. In this section, we will explore the major components, including Major Version, Minor Version, and Micro Version.</p>
<h3 class="wp-block-heading">Major Version</h3>
<p>The Major Version denotes the most significant changes in the language, often introducing new features or language elements that are not backwards compatible. Python currently has two major versions in widespread use: Python 2 and Python 3. The transition from Python 2 to Python 3 was a significant change, with many libraries and applications needing updates to ensure compatibility.</p>
<p>For example, to check the major version of your Python interpreter, you can use the following code snippet:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys
print(sys.version_info.major)
</pre>
<h3 class="wp-block-heading">Minor Version</h3>
<p>The Minor Version represents smaller updates and improvements to the language. These changes are typically backwards compatible, and they introduce bug fixes, performance enhancements, and minor features. For example, Python 3.6 introduced formatted string literals (<a href="https://blog.finxter.com/python-f-strings-the-ultimate-guide/">f-strings</a>) to improve string manipulation, while Python 3.7 enhanced asynchronous functionality with the <a href="https://blog.finxter.com/how-to-check-asyncio-package-version-in-python/"><code>asyncio</code> module</a>.</p>
<p>You can check the minor version of your Python interpreter with this code snippet:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys
print(sys.version_info.minor)
</pre>
<h3 class="wp-block-heading">Micro Version</h3>
<p>The Micro Version is the smallest level of changes, focused on addressing specific bugs, security vulnerabilities, or minor refinements. These updates should be fully backwards compatible, ensuring that your code continues to work as expected. The micro version is useful for package maintainers and developers who need precise control over their dependencies.</p>
<p>To find out the micro version of your Python interpreter, use the following code snippet:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys
print(sys.version_info.micro)
</pre>
<p>In summary, Python versions are a combination of major, minor, and micro components that provide insight into the evolution of the language. The version number is available as both a tuple and a string, representing release levels and serial versions, respectively.</p>
<h2 class="wp-block-heading">Working with Multiple Python Versions</h2>
<p><a href="https://blog.finxter.com/how-to-run-multiple-python-versions-on-windows/">Working with multiple Python versions</a> on different operating systems like <a href="https://blog.finxter.com/python-version-anaconda/">mac</a>, Windows, and Linux is often required when developing applications or scripts. Knowing how to select a specific Python interpreter and check the version of Python in use is essential for ensuring compatibility and preventing errors.</p>
<h3 class="wp-block-heading">Selecting a Specific Python Interpreter</h3>
<p>In order to select a specific Python interpreter, you can use the command line or terminal on your operating system. For instance, on Windows, you can start the Anaconda Prompt by searching for it in the Start menu, and on <a href="https://blog.finxter.com/python-version-anaconda/">Linux or macOS</a>, simply open the terminal or shell.</p>
<p class="has-global-color-8-background-color has-background">Once you have the terminal or command prompt open, you can use the <code>python</code> command followed by the specific version number you want to use, such as <code>python2</code> or <code>python3</code>. For example, if you want to run a script named <code>example_script.py</code> with Python 3, you would enter <code>python3 example_script.py</code> in the terminal.</p>
<p><strong>Note</strong>: Make sure you have the desired <a href="https://blog.finxter.com/how-to-update-python/">Python version installed</a> on your system before attempting to select a specific interpreter.</p>
<p class="has-global-color-8-background-color has-background">To determine which Python version is currently running your script, you can use the <code>sys</code> module. In your script, you will need to <code>import sys</code> and then use the <code>sys.version</code> attribute to obtain information about the currently active Python interpreter.</p>
<p>Here’s an example that shows the Python version in use:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys
print("Python version in use:", sys.version.split()[0])
</pre>
<p>For a more platform-independent way to obtain the Python version, you can use the <code>platform</code> module. First, <code>import platform</code>, and then use the <code>platform.python_version()</code> function, like this:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import platform
print("Python version in use:", platform.python_version())
</pre>
<p>In conclusion, managing <a href="https://realpython.com/intro-to-pyenv/">multiple Python versions</a> can be straightforward when you know how to select a specific interpreter and obtain the currently active Python version. This knowledge is crucial for ensuring compatibility and preventing errors in your development process.</p>
<p class="has-base-2-background-color has-background"><img decoding="async" src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f40d.png" alt="?" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Recommended</strong>: <a href="https://blog.finxter.com/how-to-run-multiple-python-versions-on-windows/">How To Run Multiple Python Versions On Windows?</a></p>
<h2 class="wp-block-heading">Python Version Compatibility</h2>
<p>Python, one of the most widely-used programming languages, has two major versions: Python2 and Python3. Understanding and checking their compatibility ensures that your code runs as intended across different environments.</p>
<p>To check the Python version via the command line, open the terminal (Linux, Ubuntu) or command prompt (Windows), and run the following command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python --version
</pre>
<p>Alternatively, you can use the shorthand:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python -V
</pre>
<p>For checking the Python version within a script, you can use the <code>sys</code> module. In the following example, the major and minor version numbers are obtained using <code>sys.version_info</code>:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys
version_info = sys.version_info
print(f"Python {version_info.major}.{version_info.minor} is running this script.")
</pre>
<p>Compatibility between Python2 and Python3 is essential for maintaining codebases and leveraging pre-existing libraries. The <code>2to3</code> tool <a href="https://docs.python.org/3/library/2to3.html">checks for compatibility</a> by identifying the necessary transitions from Python2 to Python3 syntax. </p>
<p>To determine if a piece of code is Python3-compatible, run the following command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">2to3 your_python_file.py
</pre>
<p>Python packages typically declare their compatibility with specific Python versions. Reviewing the package documentation or its <code>setup.py</code> file provides insight into supported Python versions. To determine if a package is compatible with your Python environment, you can <a href="https://stackoverflow.com/questions/66627014/how-to-know-what-python-version-a-package-is-compatible-with">check the package’s release history</a> on its project page and verify the meta-information for different versions.</p>
<p>When using Ubuntu or other Linux distributions, Python is often pre-installed. To ensure compatibility between different software components and programming languages (like <strong>gcc</strong>), regularly verify and update your installed Python versions.</p>
<h2 class="wp-block-heading">Comparing Python Versions</h2>
<p>When working with Python, it’s essential to know which version you are using. Different versions can have different syntax and functionality. You can compare the Python version numbers using the command line or within a script.</p>
<p>To check your Python version from the command line, you can run the command <code>python --version</code> or <code>python3 --version</code>. This will display the version number of the Python interpreter installed on your system. </p>
<p>In case you are working with multiple Python versions, it’s important to compare them to ensure compatibility. You can use the <code>sys.version_info</code> tuple, which contains the major, minor, and micro version numbers of your Python interpreter. Here’s an example:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys if sys.version_info &amp;#x3C; (3, 0, 0): print("You are using Python 2.x")
else: print("You are using Python 3.x or higher")
</pre>
<p>This code snippet compares the current Python version to a specific one (3.0.0) and prints a message to the shell depending on the outcome of the comparison.</p>
<p>In addition to Python, other programming languages like <a href="https://blog.finxter.com/check-c-version/">C++</a> can also have different versions. It’s important to be aware of the version number, as it affects the language’s features and compatibility.</p>
<p>Remember to always verify and compare Python version numbers before executing complex scripts or installing libraries, since a mismatch can lead to errors and unexpected behavior. By using the command line or programmatically checking the version in your script, you can ensure smooth and error-free development.</p>
<h2 class="wp-block-heading">Frequently Asked Questions</h2>
<h3 class="wp-block-heading">How to find Python version in command line?</h3>
<p>You can find the Python version in the command line by running the following command:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python --version
</pre>
<p>Or:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python -V
</pre>
<p>This command will display the Python version installed on your system.</p>
<h3 class="wp-block-heading">How to check for Python version in a script?</h3>
<p>To check for the Python version in a script, you can use the <code>sys</code> module. Here’s an example:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys
print("Python version")
print(sys.version)
print("Version info.")
print(sys.version_info)
</pre>
<p>This code will print the Python version and version information when you run the script.</p>
<h3 class="wp-block-heading">Ways to determine Python version in prompt?</h3>
<p>As mentioned earlier, you can use the <code>python --version</code> or <code>python -V</code> command in the command prompt to determine the Python version. Additionally, you can run:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">python -c "import sys; print(sys.version)"
</pre>
<p>This will run a one-liner that imports the <code>sys</code> module and prints the Python version.</p>
<h3 class="wp-block-heading">Is Python installed? How to verify from command line?</h3>
<p>To verify if Python is installed on your system, simply run the <code>python --version</code> or <code>python -V</code> command in the command prompt. If Python is installed, it will display the version number. If it’s not installed, you will receive an error message or a command not found message.</p>
<h3 class="wp-block-heading">Verifying Python version in Anaconda environment?</h3>
<p>To verify the Python version in an Anaconda environment, first activate the environment with <code>conda activate &lt;environment_name&gt;</code>. Next, run the <code>python --version</code> or <code>python -V</code> command as mentioned earlier.</p>
<h3 class="wp-block-heading">Determining Python version programmatically?</h3>
<p>Determining the Python version programmatically can be done using the <code>sys</code> module. As shown in the second question, you can use the following code snippet:</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">import sys
print("Python version: ", sys.version)
print("Version info: ", sys.version_info)
</pre>
<p>This code will print the Python version and version information when executed.</p>
<div class="wp-block-image">
<figure class="aligncenter size-full"><a href="https://blog.finxter.com/how-to-check-your-python-version/" target="_blank" rel="noreferrer noopener"><img loading="lazy" decoding="async" width="1024" height="576" src="https://blog.finxter.com/wp-content/uploads/2023/08/pythonVersion-scaled-1.jpg" alt="" class="wp-image-1646579" srcset="https://blog.finxter.com/wp-content/uploads/2023/08/pythonVersion-scaled-1.jpg 1024w, https://blog.finxter.com/wp-content/uploads/2023/08/pythonVersion-scaled-1-300x169.jpg 300w, https://blog.finxter.com/wp-content/uploads/2023/08/pythonVersion-scaled-1-768x432.jpg 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a></figure>
</div>
<p><img decoding="async" src="https://s.w.org/images/core/emoji/14.0.0/72x72/1f40d.png" alt="?" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Recommended</strong>: <a href="https://blog.finxter.com/how-to-check-your-python-version/">HOW TO CHECK YOUR PYTHON VERSION</a></p>
<p>The post <a rel="nofollow" href="https://blog.finxter.com/check-python-version-from-command-line-and-in-script/">Check Python Version from Command Line and in Script</a> appeared first on <a rel="nofollow" href="https://blog.finxter.com">Be on the Right Side of Change</a>.</p>
</div>


https://www.sickgaming.net/blog/2023/08/17/check-python-version-from-command-line-and-in-script/