Installing Eclipse IDE on Windows

for Python Developers

Brief walkthrough for Python developers explains how to install Python IDE in Eclipse on Windows

Revision 01/15/2019

© Copyright 2019 Alexander Murashkin

Introduction

Eclipse Python Development Toolkit (PyDev) is an add-on to Eclipse IDE. See more information at https://www.pydev.org/🌐

For more detailed explanation of Eclipse installation, update, configuration, etc. see the companion document “Installing Eclipse IDE on Windows for Java and C/C++ Developers“.

There are following steps that you need to perform before you can develop Python programs using Eclipse

After all components are installed and configured, you shall write a sample Python program in Eclipse and run it.

Installing Eclipse IDE

We recommend to follow the companion document “Installing Eclipse IDE on Windows for Java and C/C++ Developers“. But you can install Eclipse in any other way.

Install whatever Eclipse variant you desire, for example, Eclipse IDE for Java. Or you can install Eclipse Platform, Java EE, C/C++ Developers, etc.

You shall perform the following steps before proceeding to Python specific tasks

Step to performCompanion document section
OverviewIntroduction
Install Java SE Development Kit (JDK)Java Standard Edition (Java SE)
Install Eclipse IDE itselfInstalling Eclipse IDE
Run Eclipse IDERunning Eclipse IDE the First Time

Return to this document after all abovementioned steps are completed.

Installing Python Interpreter

Vendor’s instructions are at https://docs.python.org/3.7/using/windows.html#installing-python🌐. Note that 3.7 shall be replaced with the Python version that you intend to install. Also note that if you use Windows version prior to Windows Vista (for example, Windows XP) you shall install Python 3.4.

You shall read the vendor’s instructions but do not have to. This document provides enough details.

Use your browser to open https://www.python.org/🌐 website. The screenshots were taken when the last version was Python 3.6.3, but you will see more recent version.

Click on the latest Python version in Download section.

On the next page scroll down to Files section and click on Windows x86-64 executable installer (or, if you are running older 32bit Windows, Windows x86 executable installer).

Save the downloaded file somewhere. Specific file dialogs depend on the browser and the version of Windows. Here is an example for Firefox.

Find the downloaded Python installer and run it.

You will see the window below.

You need to decide whether you want to add Python to PATH environment variable. Note that this setting does not affect Eclipse.

When Python is in the PATH and you run Python program from a command line

Below is assumed that Python is added to PATH. Adjust it as needed.

If you are installing Python for yourself

If you are doing shared Python installation (so all users can use Python) or need to choose different location or features

If you select custom installation, the following window will appear.

Select desired features (we recommend pip to be always selected). Press Next button.

Advanced Options window will appear. If you are installing Python for yourself

If you are doing shared Python installation

Wait until the install process completes.

Press Close button to exit the installer.

Installing Eclipse Python Development Toolkit (PyDev) Add-on

If you have Eclipse IDE for Java or C/C++ Developers or any other Eclipse IDE variant and want to do Python development, you will have to install PyDev add-on.

This document provides detailed installation instructions. If you prefer, you can follow brief instructions at https://www.pydev.org/manual_101_install.html🌐. It does not matter which way is used to install PyDev, as long as it is done properly.

To be able to install add-ons (or update), Eclipse requires an Internet access. By default, Eclipse uses the same settings as Windows browser, so if you can browse the Internet, you, very probably, will be able to use install/update features in Eclipse. See the companion`s “Appendix 3 - Configuring Eclipse for Internet Access”, if you are having Internet connectivity problems in Eclipse.

If you are using Windows 10, 8, 7, or Vista and Eclipse is installed in some folder inside \Program Files or some other similar folder

✔ You have to run Eclipse as Administrator in order to be able to install Eclipse add-ons or update Eclipse software. In such a case close all open Eclipse windows. Start Eclipse again with “Run as Administrator” option (move mouse pointer over Eclipse icon, right click to open a context menu, select “Run as Administrator”). After a workspace selection window appears, select an appropriately named workspace that is not used for anything else (for example, C:\Users\Kamilla\Workspace\Administrator). See companion`s “Appendix 4 – Managing Eclipse Software” for details.

✔ After Eclipse software is installed/updated exit the Eclipse and start it again regular way.

✔ IMPORTANT! Do not run Eclipse “as Administrator” unless you are doing Eclipse software install/update!

If Eclipse is installed in your user data folder or you are not using Windows 10, 8, 7, or Vista

✔ You can install Eclipse add-ons and update Eclipse software by launching Eclipse regular way, using any Eclipse workspace.

✔ You can use existing workspace or create new workspace dedicated to Python.

Start Eclipse as Administrator, if needed.

In the Eclipse window, open Help menu, select Install New Software option.

You will see the following window

Check Hide items that are already installed if it is not checked already. Press Add button to add PyDev update site to Eclipse.

When all components are selected click Next button and complete the installation.

After you press Add button , you will see the pop-up window above. Enter the following

Name PyDev – Python IDE for Eclipse
Location https://www.pydev.org/updates/

and press OK button .

Now select PyDev for Eclipse and PyDev Mylyn Integration and click Next button.

Note. If you do not see PyDev for Eclipse and PyDev Mylyn Integration, or see “All items are installed” message – it means that PyDev components are already installed. In such a case, just cancel the installation wizard.

You will see a window with a list of components to be installed. You may see more components than shown below if, for example, you installing Mylyn for the first time.

Press Next button to continue.

You will see the following window

Review the licenses. Select “I accept the terms of the license agreements and press Finish button .

Wait until the installation is completed.

If you get the Security Warning popup window below

press Install anyway button.

When the installation is done you might see another security pop-up window asking to confirm that you want to allow Eclipse an access to the Internet.

Click Allow access button.

Next you will see a window prompting to restart Eclipse.

if Eclipse is running under your username, press Restart Now button (A) to restart.

Otherwise, press No button (B), exit Eclipse, and start Eclipse again (as regular user).

✔ If Eclipse is running as Administrator and you pressed Restart Now button - do not select a workspace, press Cancel button instead to exit Eclipse.

✔ If you prefer the workspace configuration to be done later, that is it.

✔ Otherwise, start Eclipse again in regular way.

Python Specific Eclipse Workspace Configuration

Be sure that you are running Eclipse as regular user. After you restarted (or started) Eclipse, you will see Workspace Launcher window asking to select a workspace.

Select an appropriate workspace. If you use different workspace for different languages you might want to enter new workspace name, for example, Python .

Press OK button . You will see Eclipse splash window.

Wait until the main Eclipse window appears.

After few seconds you will see a welcome window. The specific window depends on what Eclipse version/variant is installed – Eclipse IDE for Java, Java EE, C/C++ Developers, etc.

Eclipse PyDev is installed, but to be able to run and debug Python programs, it is necessary to adjust some Eclipse preferences.

To adjust the preferences, open Window menu and select Preferences option.

You will see Eclipse preferences window.

Click on a small white triangle(or angle ) left to the “PyDev” to open PyDev preferences (if you do not see the (tri)angles move mouse pointer to the left (white) panel and they will appear).

Click on a small white triangle(or angle ) left to ”Interpreters” preferences to see a list of supported interpreter types.

Click on “Python Interpreter” to select Python interpreter preferences.

Press Quick Auto-Config button to add the Python interpreter (that you have previously installed).

The preference window will show a list of found Python interpreters . If there are multiple interpreters, be sure to move the interpreter (that you have installed) to the top using Up and Down buttons.

Press Apply and Close button to save the preferences.

Further Reading

See http://www.pydev.org/manual_101_root.html for PyDev manuals.