Python environment variable setting method _python

Source: Internet
Author: User
Tags python script

The scripting language in Alias Maya is Mel and Python, and it is said that Houdini will also use Python as the primary scripting language in the future, and that mastering the Python language is an essential skill for the film and television special effects division, although Maya built the Python runtime, but If you want the system to learn the Python language, environment variables need to be configured ~

By default, the system does not automatically add the appropriate environment variables after you install Python under Windows. It is not possible to enter the Python command at the command line at this point, and the configuration method is as follows:

1. First you need to register the Python environment variable in the system: assuming that the Python installation path is c:\python2.6, modify My Computer-> properties-> the advanced-> environment variable-> The path in the system variable is:

(To run the Python command in command-line mode, you need to attach the directory where the Python.exe resides to the environment variable of path.) )

Copy Code code as follows:

Path=path;c:\python26

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 the *.py directly, just modify another environment variable Pathext:

Copy Code code as follows:

Pathext=pathext;. PY;. PYM

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.