How to check the current version number in Python_How to check the current version number in Python

王林
Release: 2024-04-02 18:50:06
forward
1096 people have browsed it

1. First enter the Ubuntu system, and then use ‘Ctrl Alt T’ to open the Ubuntu command line terminal.

How to check the current version number in Python_How to check the current version number in Python

2. Then the Ubuntu system generally contains two versions of Python, python2 and python3. When we query the python version specified by the system by default, we use the command [python --version] to query.

How to check the current version number in Python_How to check the current version number in Python

3. Then the Ubuntu system generally contains two versions of Python, python2 and python3. When we query the corresponding python version, we use the command [python2 --version]/[python3 --version] to query.

How to check the current version number in Python_How to check the current version number in Python

4. In addition to the above methods, we can also enter Python to view. After entering Python, the current version number will pop up by default, command [python].

How to check the current version number in Python_How to check the current version number in Python

5. After finally entering python, you can use sys to query the system installation path and resource path corresponding to python, command [import sysprint(sys.path)].

How to check the current version number in Python_How to check the current version number in Python

The above is the detailed content of How to check the current version number in Python_How to check the current version number in Python. For more information, please follow other related articles on the PHP Chinese website!

source:zol.com.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template