1

I've been using and learning Python 3.3 for a while, with the Aptana IDE for Windows.

After some issues I've now managed to install a Kivy-package. The only way I can manage to run programs with Kivy, however, is to run the .py-files from the file manager (after assigning .py-files to Kivy).

When trying to run the files from Aptana it says

ImportError: No module named 'kivy'

Any guidance on how to make the Kivy-apps run from Aptana?

@qua-non The bat file looks like this:

@ECHO off

set kivy_portable_root=%~dp0
ECHO botstrapping Kivy @ %kivy_portable_root%


IF DEFINED kivy_paths_initialized (GOTO :runkivy)

ECHO Setting Environment Variables:
ECHO #################################

set GST_REGISTRY=%kivy_portable_root%gstreamer\registry.bin
ECHO GST_REGISTRY
ECHO %GST_REGISTRY%
ECHO ---------------

set GST_PLUGIN_PATH=%kivy_portable_root%gstreamer\lib\gstreamer-1.0
ECHO GST_PLUGIN_PATH:
ECHO %GST_PLUGIN_PATH%
ECHO ---------------

set PATH=%kivy_portable_root%;%kivy_portable_root%Python33;%kivy_portable_root%tools;%kivy_portable_root%Python33\Scripts;%kivy_portable_root%gstreamer\bin;%kivy_portable_root%MinGW\bin;%PATH%
ECHO PATH:
ECHO %PATH%
ECHO ----------------------------------

set PKG_CONFIG_PATH=%kivy_portable_root%gstreamer\lib\pkgconfig;%PKG_CONFIG_PATH%
set PYTHONPATH=%kivy_portable_root%kivy;%PYTHONPATH%
ECHO PYTHONPATH:
ECHO %PYTHONPATH%
ECHO ----------------------------------

SET kivy_paths_initialized=1
ECHO ##################################


:runkivy

ECHO done bootstraping kivy...have fun!\n
IF (%1)==() GOTO SHELL
ECHO running "python.exe %*" \n
python.exe  %*
IF %errorlevel% NEQ 0 (PAUSE)
GOTO END
:SHELL
ECHO.
ECHO -----------------------------------------------------------------------
ECHO - Running a shell, you can browse kivyexamples and launch apps with: -
ECHO - python app.py -
ECHO -----------------------------------------------------------------------
ECHO.
cmd
:END

Can you advise on which paths that needs to be copied into the IDE settings?

Enthuziast
  • 1,195
  • 1
  • 10
  • 18

2 Answers2

3

Wiki.kivy.org has a few solutions for setting up kivy with different IDEs. Mostly it's about setting the correct paths. I'd suggest opening up kivy.bat bundled with kivy and taking note of the path set in there. Then adjust your favorite IDE to include those paths.

qua-non
  • 4,152
  • 1
  • 21
  • 25
  • Hi! Posted the code in my original question, as it was too long for the comment Field. – Enthuziast Feb 12 '14 at 23:57
  • Also: I am not bound to Aptana. Are there any IDEs that is more kivy-ready by default? – Enthuziast Feb 12 '14 at 23:57
  • look at this answer here about kivy and how to set it up in other ides for a guide. http://stackoverflow.com/questions/21355915/configure-kivy-path-in-pydev-eclipse-debian/21654561?noredirect=1#comment32913691_21654561 – qua-non Feb 14 '14 at 20:32
0

kivy doesn'y support Python 3

from kivy FAQ

Does Kivy support Python 3.x?

No. Not yet. Python 3 is certainly a good thing; However, it broke backwards compatibility (for good reasons) which means that some considerable portion of available Python projects do not yet work with Python 3. This also applies to some of the projects that Kivy uses as a dependency, which is why we haven’t make the switch yet. We would also need to switch our own codebase to Python 3. We haven’t done that yet because it’s not very high on our priority list, but if somebody doesn’t want to wait for us to do it, please go ahead. Please note, though, that Python 2.x is still the de facto standard.

laike9m
  • 18,344
  • 20
  • 107
  • 140
  • 1
    Thanks! I think it does support 3.3 now, but that the documentation you refer to is outdated. http://kivy.org/downloads/1.8.0/Kivy-1.8.0-py3.3-win32.zip – Enthuziast Feb 09 '14 at 08:21
  • @Enthuziast You're right, I didn't know that. You'd better provide more information so that others can have a clearer view of what happended, at least show us your source code and file tree. – laike9m Feb 09 '14 at 09:50
  • I just updated the faq entry to be correct, Kivy has officially supported Python 3 since the most recent release a few days ago. Thanks for pointing this out! – inclement Feb 11 '14 at 17:55