Python environment variable automatic configuration script (Setx use)

Source: Internet
Author: User

Preface

SETX is not a tool that comes with windows, it needs to be downloaded from Microsoft's website, but some systems will bring it. (provided by the official, can be assured to eat)

Both set and SETX can be used to configure environment variables. Their difference is that set is just a temporary modification of environment variables, the effect disappears after the console shuts down, and setx can permanently change the environment variable (the registry is automatically modified).

Download Link

Setx download (from CSDN): http://download.csdn.net/download/rpyoyo/2478379

can also use my download link (from the school computer room machine found, the system comes with): Http://files.cnblogs.com/files/yym2013/setx.rar

Code

The script is simple, just one line, but it avoids the hassle of manually adding system environment variables:

Python27 (32b)-autoconfig.bat

1 : : function: 2 :: Automatically configure Python directory to system variable path 3 :: 4 :: Precautions: 5 1 . Need and Setx.exe in the same directory 6 2 . Required is the default installation location 7 8 :: Add python directory to system variable path 9 " %path%; C:\python27"
Precautions

1. The script needs to be placed in the same directory as the Setx.exe file

2, Python needs to be the default installation location

3, This version only adapts to python2.7 (32 bit), other version of the self-modification installation directory location .

python3.5, for example, will

setx/m path "%path%; C:\python27 "

Modified to:

setx/m path "%path%; C:\python35 "

Setting environment variables for Java or other development environments is a good idea.

Reference Documents

HTTPS://TECHNET.MICROSOFT.COM/ZH-CN/LIBRARY/CC754250 (ws.10). aspx

Python environment variable automatic configuration script (Setx use)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.