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