Python environment variable setting method, python environment variable

Source: Internet
Author: User

Python environment variable setting method, python environment variable

The scripting languages in Alias Maya are Mel and Python. It is said that Houdini will also use Python as the main scripting language in the future. As a special effect teacher, mastering the Python language is a required skill; although Maya has built-in Python runtime, you still need to configure the environment variables if you want to learn the Python language systematically ~

By default, the system does not automatically add corresponding environment variables after python is installed in windows. In this case, the python command entered in the command line cannot be executed. The configuration method is as follows:

1. first, you must register the python environment variable in the system. Assume that the python installation path is c: \ python2.6, modify the PATH in my computer> Properties> advanced> environment variables> system variables:

(To run the pythoncommand in the command line, add the directory of python.exe to the path environment variable .)

Copy codeThe Code is as follows:
PATH = PATH; c: \ python26

After the preceding environment variables are successfully set, you can directly use the python command on the command line. Or run "python *. py" to run the python script.

2. At this time, you can only run the python script through "python *. py". If you want to directly run *. py, you only need to modify another environment variable PATHEXT:

Copy codeThe Code is as follows:
PATHEXT = PATHEXT;. PY;. PYM

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.