Configuring the Python environment variable

Source: Internet
Author: User
Tags python script
By default, the system does not automatically add the appropriate environment variables after you install Python under Windows. You cannot use the Python command directly at this time on the command line.

1. First you need to register the Python environment variable in the system: assuming that the Python installation path is c:\python2.5, open the "My Computer-> Properties-> Advanced-> environment variable-> system variable" appended to the value of path: "; c:\ Python25 "(Remember to add"; " Semicolon), separated from the previous value

Once the above environment variables are set successfully, you can use the Python command directly at the command line. Or execute Python *.py to run the Python script.

2. At this point, you can only run the Python script through "Python *.py", and if you want to run *.py directly, open another environment variable pathext, append the value later:

“ ;. PY;. PYM "Reprint: http://apps.hi.baidu.com/share/detail/31211367

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.