Python Development Environment Building

Source: Internet
Author: User

Since some of the work needs to be developed using Python, try to build a python development environment at home to learn. Although the online tutorials are more, but for the novice, there will be a lot of pits to fill. Let's talk about my python development environment building process.

1 python installationTo download the installation package from the official website, you need to choose the installation package according to your operating system type and number of digits. I am downloading the Windows 32-bit python2.7.11 version here.
after the download is complete, double-click Start Installation and set the installation path:
Click Next, Select Add Python.exe to path in the following step entire feature would installedon the local hard drive, then click next:< /c6>
then click Finish on the installation End screen:
after installation, the environment variable needs to be configured, in the system environment variable PATH variable, the Python installation directory is added to the end:
Finally, you can enter Python from cmd to verify that the installation is correct:


If you are prompted not to find the command, and so on, you can restart your computer for verification. The current online tutorials are installed and configured after the path of the direct verification, and does not indicate the need to restart, from the personal practice, if the restart before the verification fails, you can try to restart the computer and then look . at this point, the Python run environment is configured. here's how to build a Python IDE development environment:here to install most of the online teaching materials to build the basic is correct, you can take doctrine in Eclipse's help--install new software, click Add Name Input pydev, link address input:http://pydev.org/updates then select Pydev, The other may not be selected. Can be downloaded, and will confirm whether you agree or something. After the installation is complete, restart Eclipse takes effect.


Configure the path to Python.exe in eclipse:
After opening eclipse, click Window--preference--pydev-------Interpreters (interpreter)---Python interprete-----Click New, Then navigate to the installation path of the Python.exe. For example, this will be configured as well. New workspace python.


The final interface is as follows:

at this point, the Python integrated development environment is built. First Python program--helloworldOpen Eclipse, click New ...:

Enter project name: Pydevtest, click Finish, new src directory:
in the SRC directory, create a new Pydev module with the name HelloWorld:
Enter the HelloWorld code:

when you're done, click the Run button in the arrow to run. generally reported "syntaxerror:non-ascii character ' \xe5 ' in file G:\python\pyProject\PyDevTest\src\ helloworld.py on line 3, but no encoding declared; See http://python.org/dev/peps/pep-0263/for Details "error, in fact, the Chinese encoding problem is caused, only need to add" in the first line of the file "#coding: Utf-8 ", specify the encoding format as UTF-8 to resolve.
at this point, the Python development environment is built.

Python Development Environment Building

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.