Hide menu

Python Integration in Eclipse

In order to use Eclipse for rapid prototyping, scripting, and debugging with iPython and OpenCV, some few additional steps are required:

  • Install PyDev, either through the Marketplace (Mac OS / Windows) or the system package manager (Linux)
  • Tick box "Connect console to Variables Debug View?" in preferences/PyDev/Interactive Console
  • Configure correct interpreter in preferences/PyDev/Interpreter - Python. Auto Config might fail in some cases and the Libraries as well as Environment have to be checked. On Mac OS, the TBB path has to be added to the environment.
  • Optional: The Code Analysis will fail to identify import commands for OpenCV modules, thus producing error messages. To change that, go to preferences/PyDev/Editor/Code Analysis and change the setting for "Import not found".
  • Generate New/Project.../PyDev/PyDev Project, an appropriate name might be e.g. "OpenCV Prototyping". You may select to generate a source catalog and to associate your project with OpenCV
  • Generate New/PyDev Package, an appropriate name could be "first tries".
  • Generate New/PyDev Module, use a name for what you intend to do. This then generates the respective .py file. Do not forget to add "import cv2" or "import cv2.cv as cv" in the beginning of the file.

Further information may be found at the PyDev homepage.


Last updated: 2014-03-18