Home >Software Tutorial >Computer Software >How to set environment variables in Python How to set environment variables in Python

How to set environment variables in Python How to set environment variables in Python

王林
王林Original
2024-08-06 05:08:02467browse

Many users are not familiar with how to set environment variables in Python when using Python software? Below, the editor will bring you how to set environment variables in Python. Let's take a look below. How to set environment variables in Python? How to set environment variables in Python: First, right-click - Computer (this computer), click to enter properties, as shown in the picture

Python怎么设置环境变量 Python设置环境变量的方法

After entering the system to become familiar with it, click to enter - Advanced System Settings, as shown in the picture

Python怎么设置环境变量 Python设置环境变量的方法

In the system In the properties, click the -Environment Variables-button, as shown in the figure

Python怎么设置环境变量 Python设置环境变量的方法

In the environment variables page, click -New under "Administrator's User Variables", as shown in the figure

Python怎么设置环境变量 Python设置环境变量的方法

In the New User Variables, set Variable name: Path Variable value: C: PythonPython27; C: PythonPython27Scripts; as shown in the figure, the version is different and can be changed manually, such as: C: PythonPython37; C: PythonPython37Scripts;

Python怎么设置环境变量 Python设置环境变量的方法

After clicking OK, a new user will appear in the environment variable variable, then click OK again to complete the setting, as shown in the picture

Python怎么设置环境变量 Python设置环境变量的方法

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