Using Kivy with Eclipse and PyDev

6,954 views
Skip to first unread message

Philippe Delrieu

unread,
Sep 24, 2011, 3:09:16 AM9/24/11
to Kivy users support
Hi,
I don't find any issue in the group archive that why I would like to
point out that I succeed to run Kivy example in Eclipse with PyDev. I
do the following conf :
* use the python interpreter use to run Kivy example in the PyDev
configuration
* add the Kivy lib in the project PYTHONPATH
* set the PATH, GST_PLUGIN_PATH, GST_REGISTRY in the run
configuration ->env.

I try simple example and it work with the debugger.

regards
Philippe

Mathieu Virbel

unread,
Sep 24, 2011, 3:11:16 AM9/24/11
to kivy-...@googlegroups.com
Thanks for reporting, would be nice to put that in documentation :)

2011/9/24 Philippe Delrieu <com...@gmail.com>:

Guojian Miguel Wu

unread,
Jul 26, 2012, 6:01:34 PM7/26/12
to kivy-...@googlegroups.com
Any docs/step by steps instructions on using PyDev with Kivi?

Thanks.

Pavel Kostelník

unread,
Jul 26, 2012, 6:14:18 PM7/26/12
to kivy-...@googlegroups.com
That depends on platform I guess, but for me (Mac OS 10.7):

1. install PyDev
2. manually add kivy package (compiled one, not the .dmg for mac) to python packages (done in Eclipse -> preferences -> PyDev -> interpreters)
3. rebuild the package repository for interpreter (done in Eclipse -> preferences -> PyDev -> interpreters)

=> viola !

Dne pátek, 27. července 2012 0:01:34 UTC+2 Guojian Miguel Wu napsal(a):
Message has been deleted

Guojian Miguel Wu

unread,
Jul 26, 2012, 11:22:12 PM7/26/12
to kivy-...@googlegroups.com
Thank you.
Message has been deleted

qay

unread,
Aug 3, 2012, 3:38:07 AM8/3/12
to kivy-...@googlegroups.com
Hi,

I tried this setup but still have problems.

Below an image of the interpreter setup
I thing the problem is the setup of PATH, GST_PLUGIN_PATH, GST_REGISTRY.
Below is also an image of the environment setup and an test project example.
As you can see the kivy import fails. If I start the example with the right click 'send to -> kivy....' it works.

Any suggestions?

with best regards,


nepix32

unread,
Aug 3, 2012, 4:23:23 AM8/3/12
to kivy-...@googlegroups.com
As far as I can see, your PATH variable is set in a wrong way:
 
In the PyDev interpreter section of Environment
 
Variable
PATH
Value
PATH = mypath1;mypath2;%PATH%
 
should read
 
Variable
PATH
Value
mypath1;mypath2;%PATH%
 
instead (assuming M$ Windows as OS).
 
see also

qay

unread,
Aug 3, 2012, 5:16:53 AM8/3/12
to kivy-...@googlegroups.com
Arggg :-(
yes it was wrong. Copy/ Past error from the link you mentioned.
I created a new proj to be sure the new Environment values are used but still the same problem with 'ImportError: No module named kivy'.

And yes it's win 7 ;-)

best reagrds,

nepix32

unread,
Aug 3, 2012, 6:21:30 AM8/3/12
to kivy-...@googlegroups.com

And yes it's win 7 ;-)
I tried it on XP and Win7 exactly as outlined in the mentioned
and i mean the last post of user698585
 
See his second item:
  • * add kivy package folder under libraries tab (still in Python Interpreters Prefs section making sure the kivy python interpreter is selected)
 
I am missing that in your screenshot. There should be one item like:
C:\Python27\kivy-1.3\kivy
 
It is weird that you are nesting python interpreters C:\Python27 and C:\Python27\kivy-1.3\Python
However, not sure if that could give a problem.

qay

unread,
Aug 3, 2012, 10:47:30 AM8/3/12
to kivy-...@googlegroups.com
Ohhhhhhhhh man THX a lot nepix32 :-)
Yes the problem was the missing kivy subfolder. I added it with 'New Folder'.
Now it looks like:



Deathcloset

unread,
Aug 4, 2012, 11:43:13 PM8/4/12
to kivy-...@googlegroups.com
Had to attach screenshot of my eclipse configuration - google groups wouldn't insert inline for some reason.

At any rate - attached png is the eclipse configuration I have managed to get working on Macintosh OS X 10.7.4 with python 2.7.1 with the wonderful pydev.

Pretty much I only needed to install Cython and create a symlink to the (downloaded non-compiled) /Applications/Kivy.app/Resources magical location (eclipse can't navigate or browse within mac app packages seemingly).
Screen Shot 2012-08-04 at 8.33.13 PM.png

Cam Jackson

unread,
Nov 26, 2012, 12:02:42 AM11/26/12
to kivy-...@googlegroups.com
Hey everyone,

I went through the previously mentioned instructions (including setting the environment variables in PyDev) and that was enough to get PyDev to run Kivy applications. However, the PyDev editor was still not finding the Kivy source, which meant that I was getting lots of import errors, and auto-complete was not working. I ended up creating a symlink from the site-packages directory of Kivy's Python installation to the Kivy source folder, and that seemed to fix it.

I've described the entire process of getting Kivy to work in PyDev in a blog post here: http://www.ocularsoftware.com/2012/11/how-to-use-pydev-to-develop-and-run-kivy-applications-on-windows/

Hope that helps someone.

marlus araujo

unread,
Jan 6, 2013, 12:46:58 AM1/6/13
to kivy-...@googlegroups.com
Pavel, could you give more information about installing Kivy interpreter on Aptana Pydev?

on OS X, where do I get compiled kivy package?
I've downloaded Cython and github repository.

after run $ sudo python setup.py install
I could not find package. What is it?

Thank you!

marlus araujo

unread,
Jan 6, 2013, 12:57:50 AM1/6/13
to kivy-...@googlegroups.com
Oh, I've found it:
/Applications/Kivy.app/Contents/Resources/script

Very easy to configure on OS X, but the script is located on Kivy.app.
Could not find on repo after run setup

Mathieu Virbel

unread,
Jan 6, 2013, 6:27:18 AM1/6/13
to kivy-...@googlegroups.com

The script is available only in the app, because it need to be configured to use all the libraries we ship within the app.

If you install kivy and dependencies manually, then just use python.

Mathieu

--
 
 

zeller...@gmail.com

unread,
Nov 9, 2013, 8:38:22 AM11/9/13
to kivy-...@googlegroups.com
You should really create some <official> walkthroughs to setup a develpoment environment on various platforms w/various IDEs.
It would make your product more user friendly.
It wasn't such a big deal with this thread and SO posts, and even (at least) one blog post available, but the point that all these resources exist point that such a thing is non-trivial.
Just a suggestion, no offense meant!

ZenCODE

unread,
Nov 9, 2013, 4:54:28 PM11/9/13
to kivy-...@googlegroups.com
Yes, agreed Zeller! And I plan on adding such a thing to the wiki.

https://github.com/kivy/kivy/wiki

Based on this : http://www.ocularsoftware.com/2012/11/how-to-use-pydev-to-develop-and-run-kivy-applications-on-windows/

Basically, there are 3 environment variables one needs to set up. It's difficult to make an IDE specific version, as there are so many IDE's, and they are continually changing. But I agree we should at least address the basic principles. Plan on adding that soon...;-)

Peace out


Reply all
Reply to author
Forward
0 new messages