Setting Up Python Development Environment

Summary: in this tutorial, we will show you how to install Python and setup development environment for developing Python applications.

Installing Python

In order to develop applications in Python, you need to have at least Python distribution installed in your system. Python provides you with many installers in various popular platforms such as Linux, UNIX, Windows and Mac OS X. The  installers make it very easy for you to install Python.

We are going to show you how to install Python for Windows platform.

  • First, go to the Python’s office website http://python.org/ and navigate to the download section http://python.org/download/
  • Second, download the suitable installer. We chose Python 3.3.0 Windows X86-64 MSI Installer to download.
  • Third, double click on the download file and follow the steps below:
Install Python Step 1
Install Python Step 2
Install Python Step 3
Install Python Step 4
Install Python Step 5

Installing Python IDE

IDE stands for integrated development environment. IDE provides a lot of features such as syntax highlighter, debugger, and code completion,etc., that help you develop Python application faster and more productive.

There are many Python IDEs available ranging from free to commercial. You can find them all in the following links

The PyDev is Python IDE for Eclipse. It is free and easy to start with.

Installing Eclipse

In order to install PyDev, you need to install Eclipse first. You need to follow the steps below to install Eclipse:

  1. Go to the Eclipse website, download section http://www.eclipse.org/downloads/
  2. Download Eclipse Classic 4.2.1. You may see the version slightly different from this tutorial.
  3. Extract the zip file into the folder C:\eclipse

To launch Eclipse, double click on the  eclipse.exe in the  C:\eclipse folder. Eclipse will ask you for the workspace at the first time. Basically, a workspace is a directory where you store all you Python’s projects that you’re going to develop.

Enter your workspace and click OK button.

Eclipse Workspace Setup

Eclipse Workspace Setup

Eclipse IDE

Eclipse IDE

Download PyDev inside Eclipse

Go to menu: Help > Install New Software… A new dialog will appear. Enter the URL http://pydev.org/updates  in the field Work with:

Downoad PyDev Step 1

Downoad PyDev Step 1

Click Add button and enter the PyDev in the field Name.

Downoad PyDev Step 2

Downoad PyDev Step 2

Click OK button and wait for several seconds, PyDev and PyDev Mylyn Integration (optional) items will appear.

Downoad PyDev Step 3

Downoad PyDev Step 3

Select all items and click the Next > button. A new window will display, choose “I accept the terms of the license agreements”.

Downoad PyDev Step 4

Downoad PyDev Step 4

 

click Finish button and wait for a few seconds to allow Eclipse to install PyDev.

Downoad PyDev Step 4

Downoad PyDev Step 4

 

When the installation is finished, a popup will display to ask for restarting Eclipse. Click Yes button to restart Eclipse.

Configure PyDev for Eclipse

Go to menu Windows > Open Perspective > Other… Choose PyDev and click OK button

 

PyDev Config Step 1

PyDev Config Step 1

You need to configure Python Interpreter for Eclipse. Go to menu Windows > Preference and choose Pydev > Interpreter Python.

PyDev Config Step 2

PyDev Config Step 2

Enter Python 3.3 as the Interpreter name and  C:\Python33\python.exe as the interpreter executable.

PyDev Config Step 3

PyDev Config Step 3

Click OK button, the result looks like the following window:

PyDev Config Step 4

PyDev Config Step 4

Congratulation, you’ve finished setting up Python development environment. It’s time to to develop your first Python application.

  • Was this tutorial helpful ?
  • YesNo