Kivy for Python 3.3

F

fronagzen

Hello, first time poster here, and general newbie to Python.

I'm looking to write a program in Python, (and have in fact written most ofit by now,) and am trying to put together a GUI for it. Kivy looks very nice, particularly with the fact that it's supposed to be compatible with most platforms (including Android, which I would like to be able to use my program on in addition to running it on my desktop) with minimal hassle. However, its current iteration is Python 2.7 only, and I've only learned Python 3.3.

I suppose I could learn Python 2.7, but I don't really want to. (Nor rewrite my program.) I could wait for the next release of Kivy, but who knows when that will be?

In any case, it's apparently possible to pull and compile the development version of Kivy for 3.3: https://groups.google.com/forum/#!topic/kivy-dev/pRp_02jaJww/discussion, however, I haven't succeeded in getting it to work. I'm on a Windows machine, and after a good deal of wrangling, I'm getting:

C:\Users\[SNIP]\Desktop\kivy-py3>python setup.py build_ext --inplace --compiler=mi
ngw32
[INFO ] Kivy v1.8.0-dev
Windows platform detected, force GLEW usage.
running build_ext
Build configuration is:
* use_mesagl = False
* use_x11 = False
* use_rpi = False
* use_opengl_es2 = True
* use_opengl_debug = False
* use_sdl = False
* use_ios = False
* use_glew = True
Generate config.h
Generate config.pxi
cythoning kivy\properties.pyx to kivy\properties.c
building 'kivy.properties' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python33\include -IC:\Pytho
n33\include -c kivy\properties.c -o build\temp.win32-3.3\Release\kivy\properties
..o
writing build\temp.win32-3.3\Release\kivy\properties.def
C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-3.3\Release\kivy\pr
operties.o build\temp.win32-3.3\Release\kivy\properties.def -LC:\Python33\libs -
LC:\Python33\PCbuild -lm -lpython33 -lmsvcr100 -o C:\Users\Lung\Desktop\kivy-py3
\kivy\properties.pyd
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot fin
d -lmsvcr100
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I also tried to compile it with an Ubuntu virtual machine, but I failed hard on that since I'm not a native Linux user. Would anyone be able to help, either by suggesting how I can fix the above error, or, perhaps, by helpingme compile Kivy?

(I did post this on the Kivy group, but I've not gotten any response there.... The group's a bit dead.)
 
I

Ian Foote

Hello, first time poster here, and general newbie to Python.

I'm looking to write a program in Python, (and have in fact written most of it by now,) and am trying to put together a GUI for it. Kivy looks very nice, particularly with the fact that it's supposed to be compatible with most platforms (including Android, which I would like to be able to use my program on in addition to running it on my desktop) with minimal hassle. However, its current iteration is Python 2.7 only, and I've only learned Python 3.3.

I suppose I could learn Python 2.7, but I don't really want to. (Nor rewrite my program.) I could wait for the next release of Kivy, but who knows when that will be?

In any case, it's apparently possible to pull and compile the development version of Kivy for 3.3: https://groups.google.com/forum/#!topic/kivy-dev/pRp_02jaJww/discussion, however, I haven't succeeded in getting it to work. I'm on a Windows machine, and after a good deal of wrangling, I'm getting:

C:\Users\[SNIP]\Desktop\kivy-py3>python setup.py build_ext --inplace --compiler=mi
ngw32
[INFO ] Kivy v1.8.0-dev
Windows platform detected, force GLEW usage.
running build_ext
Build configuration is:
* use_mesagl = False
* use_x11 = False
* use_rpi = False
* use_opengl_es2 = True
* use_opengl_debug = False
* use_sdl = False
* use_ios = False
* use_glew = True
Generate config.h
Generate config.pxi
cythoning kivy\properties.pyx to kivy\properties.c
building 'kivy.properties' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python33\include -IC:\Pytho
n33\include -c kivy\properties.c -o build\temp.win32-3.3\Release\kivy\properties
.o
writing build\temp.win32-3.3\Release\kivy\properties.def
C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-3.3\Release\kivy\pr
operties.o build\temp.win32-3.3\Release\kivy\properties.def -LC:\Python33\libs -
LC:\Python33\PCbuild -lm -lpython33 -lmsvcr100 -o C:\Users\Lung\Desktop\kivy-py3
\kivy\properties.pyd
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot fin
d -lmsvcr100
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I also tried to compile it with an Ubuntu virtual machine, but I failed hard on that since I'm not a native Linux user. Would anyone be able to help, either by suggesting how I can fix the above error, or, perhaps, by helping me compile Kivy?

(I did post this on the Kivy group, but I've not gotten any response there... The group's a bit dead.)

Hi

Have you tried asking on the kivy irc channel? (#kivy on freenode, or
http://webchat.freenode.net/?nick=kvuser.&channels=kivy&uio=d4)

The channel is fairly active, though you might have to wait a bit for a
response.

I'm not a Windows user myself, so unfortunately I can't help with the
issue directly.

Regards,
Ian F
 
U

Ulrich Eckhardt

Welcome to Python!

Am 11.07.2013 11:09, schrieb (e-mail address removed):
I'm looking to write a program in Python, (and have in fact written
most of it by now,) and am trying to put together a GUI for it. Kivy
looks very nice, particularly with the fact that it's supposed to be
compatible with most platforms (including Android, which I would like
to be able to use my program on in addition to running it on my
desktop) with minimal hassle. However, its current iteration is
Python 2.7 only, and I've only learned Python 3.3.

Last I looked, which was half a year ago, there was some Python 3
porting of Kivy underway, as you found yourself. If I were you, I would
get on IRC (I think it was #kivy on irc.freenode.net) and try to contact
the people there about the state of the Python 3 port. Just have some
patience, there aren't hundreds of people (yet), so getting an answer
could take some time.
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:
cannot fin d -lmsvcr100 collect2: ld returned 1 exit status error:
command 'gcc' failed with exit status 1

'msvcr100' is the C runtime of MS Visual C++, I'm not sure if it is
required for building Python modules on MS Windows. Just removing it
from the commandline (or makefile) should tell you already.
Alternatively, ask The Internet(R), http://bugs.python.org/issue15315
could be an answer. ;)

Good luck!

Uli
 
P

Paul Kölle

Am 11.07.2013 11:09, schrieb (e-mail address removed):
Hello, first time poster here, and general newbie to Python.

I'm looking to write a program in Python, (and have in fact written
most of it by now,) and am trying to put together a GUI for it. Kivy
looks very nice, particularly with the fact that it's supposed to be
compatible with most platforms (including Android, which I would like
to be able to use my program on in addition to running it on my
desktop) with minimal hassle. However, its current iteration is
Python 2.7 only, and I've only learned Python 3.3. [ snipp ]
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:
cannot fin d -lmsvcr100 collect2: ld returned 1 exit status error:
command 'gcc' failed with exit status 1

It might help copying msvcr100.dll (from MS VC++ Redistributable
Package) to c:\python33\libs (or wherever your python install is). See
http://bugs.python.org/issue15315 msg191106

hth
Paul
 
F

fronagzen

Am 11.07.2013 11:09, schrieb (e-mail address removed):
Hello, first time poster here, and general newbie to Python.

I'm looking to write a program in Python, (and have in fact written
most of it by now,) and am trying to put together a GUI for it. Kivy
looks very nice, particularly with the fact that it's supposed to be
compatible with most platforms (including Android, which I would like
to be able to use my program on in addition to running it on my
desktop) with minimal hassle. However, its current iteration is
Python 2.7 only, and I've only learned Python 3.3.

[ snipp ]
C:\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:
cannot fin d -lmsvcr100 collect2: ld returned 1 exit status error:
command 'gcc' failed with exit status 1



It might help copying msvcr100.dll (from MS VC++ Redistributable

Package) to c:\python33\libs (or wherever your python install is). See

http://bugs.python.org/issue15315 msg191106



hth

Paul

Thanks for the response, and I swear that I did try googling the error, butdidn't find anything. Oh well. Anyway, it seems that adding msvcr100.dll to my python3.3\libs has done something. I'm getting a different file not found message now:


C:\Users\[SNIP]\Desktop\kivy-py3>python setup.py build_ext --inplace
[INFO ] Kivy v1.8.0-dev
Windows platform detected, force GLEW usage.
running build_ext
Build configpython setup.py build_ext --inplace --compiler
=mingw32
[INFO ] Kivy v1.8.0-dev
Windows platform detected, force GLEW usage.
running build_ext
Build configuration is:
* use_glew = True
* use_ios = False
* use_opengl_debug = False
* use_opengl_es2 = True
* use_rpi = False
* use_mesagl = False
* use_x11 = False
* use_sdl = False
Generate config.h
Generate config.pxi
skipping 'kivy\graphics\vertex_instructions.c' Cython extension (up-to-date)
building 'kivy.graphics.vertex_instructions' extension
C:\MinGW\bin\gcc.exe -mdll -O -Wall -IC:\Python33\include -IC:\Python33\include
-c kivy\graphics\vertex_instructions.c -o build\temp.win32-3.3\Release\kivy\grap
hics\vertex_instructions.o
In file included from kivy\graphics\vertex_instructions.c:314:0:
kivy\graphics\/gl_redirect.h:8:22: fatal error: GL/glew.h: No such file or direc
tory
compilation terminated.
error: command 'gcc' failed with exit status 1

Working on the reasoning that sticking the missing file into the python3.3\libs file worked, I tried adding the glew files (glew32.dll, glew32.lib, GL\glew and GL\wglew.h) there, however, it doesn't seem to have made a difference. And this I googled this before asking. Doesn't seem to be much.
 
P

Paul Kölle

Am 11.07.2013 16:26, schrieb (e-mail address removed):
[scnipp]
C:\MinGW\bin\gcc.exe -mdll -O -Wall -IC:\Python33\include
-IC:\Python33\include -c kivy\graphics\vertex_instructions.c -o
build\temp.win32-3.3\Release\kivy\grap hics\vertex_instructions.o In
file included from kivy\graphics\vertex_instructions.c:314:0:
kivy\graphics\/gl_redirect.h:8:22: fatal error: GL/glew.h: No such
file or direc tory compilation terminated. error: command 'gcc'
failed with exit status 1

Working on the reasoning that sticking the missing file into the
python3.3\libs file worked, I tried adding the glew files
(glew32.dll, glew32.lib, GL\glew and GL\wglew.h) there, however, it
doesn't seem to have made a difference. And this I googled this
before asking. Doesn't seem to be much.

Hi,

I can feel your pain beeing dragged into
compile-unknown-source-on-windows from an innocent looking python script
;) This time it's not the linker complaining but GCC (the compiler)
itself not being able to find the header file GL/glew.h. Headers are
searched in the so called "include path" which is specified in setup.py.
This link http://glew.sourceforge.net/install.html suggests glew.h is
part of VisualStudio, and has some other interesting information.

hth
Paul
 
F

fronagzen

Am 11.07.2013 16:26, schrieb (e-mail address removed):

[scnipp]
C:\MinGW\bin\gcc.exe -mdll -O -Wall -IC:\Python33\include
-IC:\Python33\include -c kivy\graphics\vertex_instructions.c -o
build\temp.win32-3.3\Release\kivy\grap hics\vertex_instructions.o In
file included from kivy\graphics\vertex_instructions.c:314:0:
kivy\graphics\/gl_redirect.h:8:22: fatal error: GL/glew.h: No such
file or direc tory compilation terminated. error: command 'gcc'
failed with exit status 1

Working on the reasoning that sticking the missing file into the
python3.3\libs file worked, I tried adding the glew files
(glew32.dll, glew32.lib, GL\glew and GL\wglew.h) there, however, it
doesn't seem to have made a difference. And this I googled this
before asking. Doesn't seem to be much.



Hi,



I can feel your pain beeing dragged into

compile-unknown-source-on-windows from an innocent looking python script

;) This time it's not the linker complaining but GCC (the compiler)

itself not being able to find the header file GL/glew.h. Headers are

searched in the so called "include path" which is specified in setup.py.

This link http://glew.sourceforge.net/install.html suggests glew.h is

part of VisualStudio, and has some other interesting information.



hth

Paul

Thanks for the response.

After a bit of tinkering, I've finally managed to compile the blasted thing! I just straight up dumped Glew into the appropriate files for VS10, and used the VS10 compiler instead of mingw32- and it worked!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top