This tutorial will help you to find Python version details inside a script. Also, you can ensure a Python script to run only the minimum version found.
Output: You can also find the details version info by using sys.version_info like below:
Show the Python hex version details. This value increases with every release of python.
Using Assert in Python
You can ensure a script runs with the minimal version required for your application. For example, if the Python application is running with a lower version of Python interpreter than required will be terminated. Add the following code to your application: