Install Python in Windows and configure the Pydev plugin in eclipse

Source: Internet
Author: User

Recently began to contact Python, in view of the previous Java-installed lessons, decided to install Python this time, the side of the process to write, for future reuse.

Download the Python version http://www.python.org/on the Python website, given that most of the current use is still 2. x version and the requirements of the Department, so I choose 2.7 version, download Python-2.7.13.msi. After downloading to look at the file size, generally more than 10 MB, too small instructions are not downloaded completely. Because of browser reasons, I did not look at the size after downloading, the result double-click Open file after the error, stating that no download completely:

After the download is done, double click on the default C drive, I choose D:\soft\Python2.7.13. Run the installed Python2.7 (Python GUI) from the Start menu, the cursor flashes after opening, the prompt on the left displays: >>>, installation succeeded

Next, configure the Python environment. Start Menu: System variable, environment variable, advanced system settings, properties, computer, path path add;D: \programming\python27;d:\programming\python27\ Scripts ". On the DOS command line, enter "Python", which appears as shown in the configuration success:

The following I do not know is the cause of eclipse or what, tossing an afternoon did not install also Pydev, finally, re-download a new eclipse, to complete the installation.

Next, add the Pydev plugin in eclipse to encode the Python program in Eclipse. (based on the original Java development, continue to use the eclipse environment to encode, improve the reuse of the tool). Open Eclipse, find the Help menu bar, go to install New software ... Options. Click on work with: Click Add...,name next to the input box to enter Pydev,location is http://pydev.org/updates, click OK. Next select the Pydev option, all the way to next, final finish. Installation takes a certain amount of time, and after installation, you need to restart eclipse.

Next configure Pydev, you need to configure the interpreter. In the Eclipse menu bar, select Window->preferences->pydev->python interpreter, where Python is configured.

First you need to add an installed interpreter, click New and enter the dialog box. Interpreter name can be arbitrarily named, interpreter executable Select the address of the Python interpreter Python.exe.

After clicking OK, a window with many checkboxes appears, select the option to add the system Pythonpath, and click OK.

Then in the Python Interpreters window, click OK again, which completes the configuration of the Python interpreter. By this Pydev the configuration has been completed and you can use eclipse to start writing python.

Hello world! In the Eclipse menu bar, select File->new->other->pydev, select Pydev Project in the window, there are three items that can be created, select Pydev Project.

Click Next, enter the project name, select the appropriate project type, and the Python syntax version and Python interpreter you are using. Click Finish to continue to select Yes.

Once created, right-click the SRC folder, select the New->pydev package, and create a new one. A __init__.py file is automatically generated, and the file does not contain any content. Then right-click the created package, select New->pydev module, create a new module, click Finish. This allows you to begin writing the first. py file. Now, finally, I can happily write Python!

Install Python in Windows and configure the Pydev plugin in eclipse

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.