Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: bayang Newsgroups: comp.lang.python Subject: Re: Trying out Kivy Date: Sat, 14 Nov 2015 13:42:57 +0100 Lines: 137 Message-ID: References: <871tbt3lml.fsf@Equus.decebal.nl> <87pozd21nb.fsf@Equus.decebal.nl> <87lha11wz4.fsf@Equus.decebal.nl> <87d1vc23zp.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: news.uni-berlin.de Th4stJLsLU/EEXNyGgl/oQg5NOYcNDBWCTMBR8LOWzmA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'modify': 0.04; 'error:': 0.05; 'ignored': 0.05; 'importerror:': 0.05; 'python3': 0.05; 'exit': 0.07; 'problem?': 0.07; 'skip:/ 10': 0.07; '#error': 0.09; '173': 0.09; '__file__,': 0.09; 'pil': 0.09; 'skip:b 70': 0.09; 'python': 0.10; 'exception': 0.13; '>>>': 0.15; 'file,': 0.15; "'gcc'": 0.16; '-o2': 0.16; '-wall': 0.16; '11:30': 0.16; '57,': 0.16; 'attr': 0.16; 'non-python': 0.16; 'nov.': 0.16; 'pygame': 0.16; 'python3.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'setuptools,': 0.16; 'skip:" 70': 0.16; 'skip:/ 50': 0.16; 'sys.exit(1)': 0.16; '\xc2\xa0if': 0.16; '\xc3\xa9crit\xc2\xa0:': 0.16; 'wrote:': 0.16; 'version.': 0.18; '>': 0.18; '>>>': 0.20; '2015': 0.20; 'extension': 0.20; 'not,': 0.22; 'file:': 0.22; 'gcc': 0.22; 'am,': 0.23; 'errors': 0.23; 'tried': 0.24; 'import': 0.24; '(most': 0.24; 'header:In- Reply-To:1': 0.24; 'skip:- 40': 0.25; 'module': 0.25; 'install': 0.25; 'command': 0.26; 'error': 0.27; 'not.': 0.27; 'message- id:@mail.gmail.com': 0.27; '8bit%:3': 0.27; "skip:' 10": 0.28; 'record': 0.29; 'installed,': 0.29; 'skip:/ 40': 0.29; 'skip:k 30': 0.29; 'symbols': 0.29; "i'm": 0.30; 'url:mailman': 0.30; 'skip:g 30': 0.30; 'window': 0.30; 'skip:- 30': 0.32; 'older': 0.32; 'maybe': 0.33; 'url:python': 0.33; 'michael': 0.33; 'traceback': 0.33; 'skip:- 10': 0.34; 'url:listinfo': 0.34; "skip:' 20": 0.34; 'file': 0.34; 'skip:& 20': 0.35; 'received:google.com': 0.35; 'installing': 0.35; 'nov': 0.35; 'skip:" 50': 0.35; 'skip:& 60': 0.35; 'skip:* 20': 0.35; 'but': 0.36; 'url:org': 0.36; 'received:209.85': 0.36; 'loaded': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'skip:& 10': 0.37; '12,': 0.37; 'difference': 0.38; 'skip:v 20': 0.38; 'version': 0.38; 'received:209': 0.38; 'self': 0.38; 'building': 0.38; 'log': 0.38; 'why': 0.39; 'skip:- 20': 0.39; 'sure': 0.39; 'does': 0.39; 'unable': 0.39; 'skip:- 60': 0.39; 'senior': 0.39; 'skip:e 20': 0.39; 'url:in': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'called': 0.40; 'software': 0.40; 'valuable': 0.61; 'latest': 0.64; '>>>>>': 0.66; 'all!': 0.84; 'casting': 0.84; 'cecil': 0.84; 'skip:/ 30': 0.84; 'url:cecilwesterhof': 0.84; 'westerhof': 0.84; 'window,': 0.84; '2014,': 0.91; 'skip:& 80': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=JCqVrIBmEs0izyS2TX618peGcEoLN0U3MxYTfTdXkSA=; b=DSxwx7/O5MklXEe2OtAfYKlttJcIHL4z5hmDUVnijd77YRLs14Ljfy0emqy6EuCsYF 6/wZozzfruFtNd2lzOIZLf8Dna+OPwmUj009prgVLH+pXaVIsysJamM0MY5J7cTTvF5w yuhSU6b+baDUzh48Q2rhqe4cykqovS2+rzDrKqG2uwB6zuaK7517CMj0azGSePbdO7Fb yV7n5K7+vIlpDWav5+gi/RyouT+Hf/Yz4mXC7pe12ZNM0Lr15z4IiN2WA3Zbs4fbAIse /WJqCbCjoMfO1ESZHiEWjIaJwbjAv8zvtJq/E4pO6no8i16nTbceVT0W7nZ/96a1lYkT S5MQ== X-Received: by 10.112.188.168 with SMTP id gb8mr12867187lbc.6.1447504977797; Sat, 14 Nov 2015 04:42:57 -0800 (PST) In-Reply-To: <87d1vc23zp.fsf@Equus.decebal.nl> X-Content-Filtered-By: Mailman/MimeDel 2.1.20+ X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98806 Le 14 nov. 2015 13:00, "Cecil Westerhof" a =C3=A9crit : > > On Friday 13 Nov 2015 21:10 CET, Cecil Westerhof wrote: > > > On Friday 13 Nov 2015 20:53 CET, Michael Torrie wrote: > > > >> On 11/13/2015 11:30 AM, Cecil Westerhof wrote: > >>> On Friday 13 Nov 2015 18:21 CET, Michael Torrie wrote: > >>> > >>>> On 11/13/2015 09:33 AM, Cecil Westerhof wrote: > >>>>> I tried to install pygame and PIL with pip3, but that did not > >>>>> find anything. > >>>> > >>>> The replacement for PIL is called Pillow. I'm not sure if it's a > >>>> drop-in replacement or not. If it's not, then you'd have to > >>>> modify Kivy to import from Pillow. Pillow does support Python3. > >>> > >>> After installing Pillow the error about PIL disappeared, but I got > >>> new errors about bcm and x11. > >> > >> Traceback? > > > > Purge log fired. Analysing... Purge finished! [INFO ] [Logger ] > > Record log in /home/cecil/.kivy/logs/kivy_15-11-13_28.txt [INFO ] > > [Kivy ] v1.9.0 [INFO ] [Python ] v3.4.1 (default, May 23 2014, > > 17:48:28) [GCC] [INFO ] [Factory ] 173 symbols loaded [INFO ] [Image > > ] Providers: img_tex, img_dds, img_gif, img_pil (img_pygame, > > img_ffpyplayer ignored) [INFO ] [Text ] Provider: > > pil(['text_pygame'] ignored) [CRITICAL ] [Window ] Unable to find > > any valuable Window provider at all! egl_rpi - ImportError: cannot > > import name 'bcm' File > > "/usr/lib64/python3.4/site-packages/kivy/core/__init__.py", line 57, > > in core_select_lib fromlist=3D[modulename], level=3D0) File > > "/usr/lib64/python3.4/site-packages/kivy/core/window/window_egl_rpi.py"= , > > line 12, in from kivy.lib.vidcore_lite import bcm, egl > > > > pygame - ImportError: No module named 'pygame' File > > "/usr/lib64/python3.4/site-packages/kivy/core/__init__.py", line 57, > > in core_select_lib fromlist=3D[modulename], level=3D0) File > > "/usr/lib64/python3.4/site-packages/kivy/core/window/window_pygame.py", > > line 8, in import pygame > > > > x11 - ImportError: No module named 'kivy.core.window.window_x11' > > File "/usr/lib64/python3.4/site-packages/kivy/core/__init__.py", > > line 57, in core_select_lib fromlist=3D[modulename], level=3D0) > > > > [CRITICAL ] [App ] Unable to get a Window, abort. Exception ignored > > in: 'kivy.properties.dpi2px' Traceback (most recent call last): File > > "/usr/lib64/python3.4/site-packages/kivy/utils.py", line 360, in > > __get__ retval =3D self.func(inst) File > > "/usr/lib64/python3.4/site-packages/kivy/metrics.py", line 169, in > > dpi EventLoop.ensure_window() File > > "/usr/lib64/python3.4/site-packages/kivy/base.py", line 126, in > > ensure_window sys.exit(1) SystemExit: 1 [CRITICAL ] [App ] Unable to > > get a Window, abort. > > > > > > I see a difference with python2. (Did not notice it before.) With > > python3 v1.9.0 is installed, but with python2 v1.8.0. > > [INFO ] Kivy v1.8.0 > > > > Maybe that is the problem? > > I tried to install v1.8.0 with: > pip3 install -I kivy=3D=3D1.8.0 > > But that gives: > building 'kivy.graphics.shader' extension > > gcc -pthread -Wno-unused-result -Werror=3Ddeclaration-after-statement -DNDEBUG -fmessage-length=3D0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=3D2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -DOPENSSL_LOAD_CONF -fPIC -I/usr/include/python3.4m -c /tmp/pip_build_root/kivy/kivy/graphics/shader.c -o build/temp.linux-x86_64-3.4/tmp/pip_build_root/kivy/kivy/graphics/shader.o > > /tmp/pip_build_root/kivy/kivy/graphics/shader.c:1:2: error: #error Do not use this file, it is the result of a failed Cython compilation. > > #error Do not use this file, it is the result of a failed Cython compilation. > > ^ > > > > Error compiling Cython file: > > ------------------------------------------------------------ > > ... > > vertex_format.last_shader =3D self > > for i in xrange(vertex_format.vattr_count): > > attr =3D &vertex_format.vattr[i] > > if attr.per_vertex =3D=3D 0: > > continue > > attr.index =3D glGetAttribLocation(self.program, attr.name) > > ^ > > ------------------------------------------------------------ > > > > kivy/graphics/shader.pyx:448:63: Casting temporary Python object to non-numeric non-Python type > > error: command 'gcc' failed with exit status 1 > > ---------------------------------------- > Cleaning up... > Command /usr/bin/python3 -c "import setuptools, tokenize;__file__=3D'/tmp/pip_build_root/kivy/setup.py';exec(compile(getatt= r(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hvd8j0e_-record/install-rec > > -- > Cecil Westerhof > Senior Software Engineer > LinkedIn: http://www.linkedin.com/in/cecilwesterhof > -- > https://mail.python.org/mailman/listinfo/python-list The latest cython version is for kivy 1.9. For kivy 1.8 you must use an older cython version. Check kivy website. That's why you get compiling errors