Categories

Python Development Using Eclipse IDE

To code Python in Eclipse, follow the procedure below:

Python and Eclipse Installation

1. Install Python if it is not yet installed. The installer can be downloaded from http://www.python.org/download/
2. Install Eclipse if it is not yet installed. Go to http://www.eclipse.org/downloads/ and download eclipse.

PyDev Plug-in for Eclipse

1. Run Eclipse
2. Go to Help -> Install New Software... (Install window will appear)
3. In the Install window, go to Work With and paste http://pydev.org/updates in the Work with field. 
4. After a few seconds, two installation options will appear. Select(check) PyDev and PyDev Mylyn Integration (but PyDev Mylyn Integration is not necessary)
5. Click Next, then OK, accept the terms and conditions and click the Finish button to continue with the installation.
6. If a window pops up with a question "Do you accept these certificates?", just Select All and click OK to continue.

Configuring PyDev in Eclipse

1. Go to Window -> Preferences
2. Expand PyDev (by clicking on the little triangle button on the left side of PyDev)
3. Select Interpreter - Python 
4. Click New button (this is in the upper right side)
5. Provide Interpreter Name (it is recommended to use the name of the Python version installed. ex: Python2.6)
6. Browse for the Interpreter Executable (the python.exe, located in C:\Python26\python.exe for example)
7. Click OK
8. Another window will appear, just click OK
9. In the Preferences window, click Apply then OK.

Verifying Installation by Creating A Python Program

1. Go to File -> New -> PyDev Project
2. Provide Project Name, and select Grammar Version and Interpreter based on the Python version installed.
3. Click Finish button
4. Go to Window -> Open Perspective -> Other. Select the PyDev perspective.
5. Add new Python file and write code. (Right click Project folder in the explorer then select New File)


No comments:

Post a Comment