Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to check python version

# To check your Python version in the command line use:
python --version

# To check your Python verson inside a script use:
import sys
print(sys.version)
Comment

get python version in code

import platform

print(platform.python_version())
Comment

check python version

# To check Python version 
python -V
----or----
python --version
Comment

check python version

# 2 ways to check python version
# In the terminal/cmd write the following:

# Way 1
python -V

# Way 2
python -c "import sys; print(sys.version)"
Comment

check python version

python --versrion
print(sys.version_info)
# sys.version_info(major=3, minor=8, micro=3, releaselevel='final', serial=0)

import platform
print(platform.python_version())

import sys
print(sys.version)
Comment

check python version

python3 --versionpip3 --version
Comment

how to check python version

python --version #in command line

python #or by enterng interactiv mode
Comment

check python version

# To check your Python version in the command line use:
py --version
Comment

check python version

python3 -v
Comment

How to Check Python Version in Script

import sys

if not sys.version_info.major == 3 and sys.version_info.minor >= 6:

    print("Python 3.6 or higher is required.")

    print("You are using Python {}.{}.".format(sys.version_info.major, sys.version_info.minor))

    sys.exit(1)
Comment

PREVIOUS NEXT
Code Example
Python :: how to make python script run forever 
Python :: python normalized correlation 
Python :: logging python 
Python :: how to put my graph in tkinter interface 
Python :: how to split strings in python 
Python :: reshape (-1,1) 
Python :: python check if value in string 
Python :: how to get the end of a item in a python array 
Python :: xlrd python read excel 
Python :: importing python modules from a folder 
Python :: python not equal to 
Python :: python get bits from byte 
Python :: dynamic printing 
Python :: arma-garch model python 
Python :: plotly facet_grid python 
Python :: plot circles in matplotlib 
Python :: tuple push 
Python :: Access field values of form django 
Python :: how to define number in python 
Python :: Get text without inner tags text in selenium 
Python :: how to add legend on side of the chart python 
Python :: string in python 
Python :: python how to invert an array 
Python :: run multiprocesses on flask 
Python :: python argsort 
Python :: standard deviation in python without numpy 
Python :: float python 
Python :: python binary float 
Python :: print("hello world") 
Python :: infinite while loop in python 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =