Thursday, January 5, 2012

Install and Configure Python 3 in Eclipse


Download latest python from http://www.python.org/download/releases

Download Eclipse from http://www.eclipse.org/downloads/     . Any of the eclipse will work. But I recommend to download the classic eclipse.

For Eclipse you need to have java installed in your machine. Windows doesn’t comes with java by default.

First install python. Just double click and follow the instructions. You may stick to the default configurations.

Then install eclipse. Extract the zip file. You may copy the entire eclipse folder to ProgramFiles or simply run eclipse from anywhere you want.

This is not the end. We need further process.

We need to install Pydev. That’s the development environment for python. Or you can say it’s the necessary plugin to configure eclipse for running python.



In the Eclipse,
Go to Help menu.
Click on “Install New Software”
Click on the link  “Available software site preferences”

.

Add a new software site.
 Under Location area: Type : http://pydev.org/updates
Under Name Section: Give any name: Say “Pydev”
 


Click ok.
Again ok.
In the ‘work with’ area, type Pydev , eclipse automatically recommends what we have configured before. Click it.
Then, select the PyDev from the list. You may omit PyDev Mylen Ingegration for now.
 


Hit Next,
Select the PyDev for Eclipse and hit Finish.
It will now download PyDev for Eclipse.
It’s strongly recommended to restart Eclipse.
Now, it’s time to configure Python Interpreters in Eclipse.
Click on ‘Window Menu’.
Click on preferences.
Click on Interpreter-Python
Click on ‘New’ button.




Browse for the location of python installed.
 


Hit ok.
It may take some time.

New Project with Python.
Click on New Project.
Under the selection wizard, click on Pydev Project
Hit Next.



Things need to be considered.
In the project type, choose Python.
Grammar Version should be 3.0
Interpreter should be Python 3.1



Make a new file and start coding python.
Example code:
print(“I am using Python.”)
Run the program as ‘Python Run’.



Enjoy Python




No comments: