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设置环境变量的方法](https://img.php.cn/upload/article/000/000/000/172289208474761.png)
After entering the system to become familiar with it, click to enter - Advanced System Settings, as shown in the picture
![Python怎么设置环境变量 Python设置环境变量的方法](https://img.php.cn/upload/article/000/000/000/172289208630889.png)
In the system In the properties, click the -Environment Variables-button, as shown in the figure
![Python怎么设置环境变量 Python设置环境变量的方法](https://img.php.cn/upload/article/000/000/000/172289208888741.png)
In the environment variables page, click -New under "Administrator's User Variables", as shown in the figure
![Python怎么设置环境变量 Python设置环境变量的方法](https://img.php.cn/upload/article/000/000/000/172289209087664.png)
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设置环境变量的方法](https://img.php.cn/upload/article/000/000/000/172289209235641.png)
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设置环境变量的方法](https://img.php.cn/upload/article/000/000/000/172289209438576.png)
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