How to add Python 3 as interpreter in Eclipse

Python 3 as interpreter in Eclipse
Python 3 as interpreter in Eclipse

The PyDev plugin adds support for working with Python files to Eclipse. However, it is only auto-configured to work with a Python 2.x interpreter. Furthermore, Ubuntu installs Python 2.x by default and needs some manual work to work with Python 3.x.

To use Python 3.x for your Python files in Eclipse:

  • First install Python 3.x:
$ sudo apt install python3
  • This installs the Python 3.x interpreter as /usr/bin/python3. We will use this in Eclipse.

  • In Eclipse, open Preferences -> PyDev -> Interpreters -> Python Interpreter. Click Add and add /usr/bin/python3. The Libraries and other settings will be auto-discovered by PyDev.

  • That is it! When you create a new Python project, in its dialog remember to pick Grammar version as 3.0 and the Interpreter as Python3.

Tried with: Python 3.4.0, PyDev 3.9.0, Eclipse Luna 4.4.1 and Ubuntu 14.04


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.