Eclipse Pydev project python grammar version 3 but run in version 2

0

I am under Eclipse Pydev 3.8.1 (fresh install of Eclipse Pydev package under Debian 9). I have created a project with python grammar 3.0:

enter image description here

But when I run it and check the version, I have python version 2.7.13:

>>> sys.version_info
sys.version_info(major=2, minor=7, micro=13, releaselevel='final', serial=0)

What have I done badly ? Besides, I would expect to be able to use version 3.5.3 which is installed on my system.

lalebarde

Posted 2019-06-16T07:52:49.807

Reputation: 573

Answers

0

I could find an answer here (in french):

PyDev has to be configured to use the right Python version available on the system. In Eclipse Workbench Menu -> Windows -> Preferences -> PyDev -> Interpreters -> Python Interpreter -> Click on New… -> Inside the "Select interpreter" GUI window, fill the field Interpreter Name: with e.g. "Python v.3.5" and the field Interpreter Executable: with the executable you want as /usr/bin/python3.5 or use the browse feature. Then valid with OK button.

lalebarde

Posted 2019-06-16T07:52:49.807

Reputation: 573