Home >Backend Development >Python Tutorial >How to check the installation path of python?

How to check the installation path of python?

青灯夜游
青灯夜游Original
2019-05-21 19:16:4916286browse

How to check the installation path of python?

How to check the python installation path:

1. How to check python2:

import sys   
print sys.path

2. How to view python3:

import sys   
print (sys.path)

Example:

Open our cmd command

First Enter the command Python, then enter the command import sys, and finally enter the command print(sys.path)

The fourth command in the list Is your installation path

How to check the installation path of python?

Related learning recommendations: python video

The above is the detailed content of How to check the installation path of python?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:What does Python mean?Next article:What does Python mean?