Home>Article>Backend Development> How to configure environment variables in python

How to configure environment variables in python

尚
Original
2019-06-25 11:27:13 10031browse

How to configure environment variables in python

Environment variable configuration:

Method 1: Use the cmd command to add the path environment variable

Enter under cmd: path=%path%;D :\Python27 Then press the "Enter" key.

Where: D:\Python27 is the installation directory of Python.

Method 2: Add the Python directory to the environment variable

(1) Right-click "Computer" and then click "Properties"

(2) Then click "Advanced System" Set "

(3) Select "Path" under the "System Variables" window and double-click it!

(4) Then in the "Path" line, add the python installation path (my D:\Python27). ps: Remember, the path is directly separated by a semicolon ";"!

How to configure environment variables in python

#(5) After the final setting is successful, enter the command "python" on the cmd command line, and the relevant display will be displayed.

How to configure environment variables in python

For more Python related technical articles, please visit thePython Tutorialcolumn to learn!

The above is the detailed content of How to configure environment variables in 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