Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kivy, Eclipse and PyDev (also PyPy)

According to this post: https://groups.google.com/forum/?fromgroups#!topic/kivy-users/n7c3thksnzg, it is possible to use Eclipse as an IDE for Kivy through PyDev. However, I didn't understand the instructions. Can anyone please elaborate on how to connect Kivy with Eclipse.

Note: I'm on a Windows machine. Also, is it possible to use PyPy instead of the Python Interpreter?

Thanks~!

like image 988
GaiusSensei Avatar asked Mar 19 '12 10:03

GaiusSensei


People also ask

How do I open PyDev project in Eclipse?

Go to Window → Open Perspective → Other and choose PyDev, then click OK. If you look at the upper right corner you will see that the perspective has changed from "Java" to "PyDev".

Can Eclipse be used for Python?

PyDev is a plugin that enables Eclipse to be used as a Python IDE (supporting also Jython and IronPython).


2 Answers

Using Kivy with Pydev on Windows xp/7

  • Under Window/Preferences/PyDev/Interpreter-Python add a new interpreter pointing to the python executable which ships with kivy portable
  • add kivy package folder under libraries tab (still in Python Interpreters Prefs section making sure the kivy python interpreter is selected)
  • In Environment tab, add the following three key-value pairs: (assumptions: kivy root is c:\kivy)

    GST_REGISTRY = c:\kivy\gstreamer\registry.bin

    GST_PLUGIN_PATH = c:\kivy\gstreamer\lib\gstreamer-0.10

    PATH = c:\kivy;c:\kivy\Python;c:\kivy\gstreamer\bin;c:\kivy\MinGW\bin;%PATH%

  • When creating a new project intended to use kivy, just specify the appropriate interpreter and you should be ready to go

like image 87
Rabih Kodeih Avatar answered Sep 28 '22 09:09

Rabih Kodeih


I think it's just pointing that:

  • The PATH, GST_PLUGIN_PATH, GST_REGISTRY environment variables must be set (which you can actually do on the command line and then start up eclipse from that command line, or set in the interpreter configuration in the environment tab): http://pydev.org/manual_101_interpreter.html.

  • Kivy must be added to the PYTHONPATH somehow. If you want, you can add it only to a project (as pointed in the post -- see: http://pydev.org/manual_101_project_conf2.html) or to the actual interpreter configuration if more projects will share that: http://pydev.org/manual_101_interpreter.html.

like image 38
Fabio Zadrozny Avatar answered Sep 28 '22 08:09

Fabio Zadrozny