Kivy fatal error opengl как исправить

I have decided to do some programming in Kivy cross platform and installed Kivy on my computer successfully. The problem is that when I run my code, I get this error:

[INFO              ] [Kivy        ] v1.9.1
[INFO              ] [Python      ] v3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 20:20:57) [MSC v.1600 64 bit (AMD64)]
[INFO              ] [Factory     ] 179 symbols loaded
[INFO              ] [Image       ] Providers: img_tex, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored)
[INFO              ] [OSC         ] using <thread> for socket
[INFO              ] [Window      ] Provider: sdl2
[INFO              ] [GL          ] GLEW initialization succeeded
[INFO              ] [GL          ] OpenGL version <b'1.1.0'>
[INFO              ] [GL          ] OpenGL vendor <b'Microsoft Corporation'>
[INFO              ] [GL          ] OpenGL renderer <b'GDI Generic'>
[INFO              ] [GL          ] OpenGL parsed version: 1, 1
[CRITICAL          ] [GL          ] Minimum required OpenGL version (2.0) NOT found!

OpenGL version detected: 1.1

Version: b'1.1.0'
Vendor: b'Microsoft Corporation'
Renderer: b'GDI Generic'

Try upgrading your graphics drivers and/or your graphics hardware in case of problems.

The application will leave now.

And this error box pops out:

Kivy Fatal Error

I have checked OpenGL version of my GPU via GPU Caps Viewer verifying me up to OpenGL Version 2.1, but Kivy somehow doesn’t detect OpenGL 2.1 and defaults to GDI Generic from Microsoft instead. I did some research on internet and found out that best way to resolve this problem is to update your graphical card’s driver from your graphical card manufacturer, but this didn’t work in my case.

I have updated my graphic drivers (I am running NVIDIA GeForce GT 435M on 64-bit Windows 8).

My question is: Is there a way to let Kivy switch from GDI Generic driver to NVIDIA driver? Or is there a problem somewhere else?

Misa Lazovic's user avatar

Misa Lazovic

2,8159 gold badges31 silver badges38 bronze badges

asked Jan 23, 2016 at 22:59

Matic Brank's user avatar

1

If you still have the problem try this:

import os
os.environ['KIVY_GL_BACKEND'] = 'angle_sdl2'

It worked for me (Windows 10, OpenGL 3.1, Python 3.6).

wovano's user avatar

wovano

4,4045 gold badges22 silver badges48 bronze badges

answered Apr 25, 2019 at 12:23

Jack Newbile's user avatar

0

On windows 7 pro 32bit adding Config.set('graphics', 'multisamples', '0') solved the error for me. (Update: This is also works on Windows 10.)

import kivy 
kivy.require('1.9.1') # replace with your current kivy version !

from kivy.app import App
from kivy.uix.label import Label

# add the following 2 lines to solve OpenGL 2.0 bug
from kivy import Config
Config.set('graphics', 'multisamples', '0')


class MyApp(App):

    def build(self):
        return Label(text='Hello world')

if __name__ == '__main__':
    MyApp().run()

After the change, the OpenGL version is reported correctly:

[INFO ] [GL ] GLEW initialization succeeded

[INFO ] [GL ] OpenGL version <2.1.0 – Build 8.15.10.2281>

naktinis's user avatar

naktinis

3,8973 gold badges36 silver badges52 bronze badges

answered Aug 10, 2016 at 14:20

576i's user avatar

576i576i

7,32111 gold badges55 silver badges92 bronze badges

2

I use Python 3.6 and Windows 8.1. Works on Windows 10 also.
this solution solve the problem in most cases :
.
1. Right click on This PC then open Properties .
2. Go to Advanced system settings .
3. Click on Environment Variables .
4. Click on New in User variables for — .
5. Put KIVY_GL_BACKEND in Variable name .
6. Put angle_sdl2 in Variable value .
7. Restart Python .

Here is a YouTube video showing these steps :
https://www.youtube.com/watch?v=ATK9w2AiDeM

uncoded0123's user avatar

answered Aug 10, 2017 at 20:54

Khaled Dallah's user avatar

0

Angle backend for py3.5+

pip install kivy.deps.angle 
set KIVY_GL_BACKEND=angle_sdl2

It works perfectly on windows 10 and its solution for above problem. Multisample won’t work in my case

answered Jun 11, 2017 at 13:13

Yash's user avatar

YashYash

6,4944 gold badges35 silver badges26 bronze badges

1

Change multisamples key value in config file (%HOMEPATH%.kivyconfig.ini for me) from multisamples = 2 to multisamples = 0.

answered Apr 9, 2017 at 10:45

Sergei Kuznetsov's user avatar

First of all, I am using Python 3.7.

I followed the below instruction first:

  1. Right click on This PC then open Properties.
  2. Go to Advanced system settings.
  3. Click on Environment Variables.
  4. Click on New in User variables for —.
  5. Put KIVY_GL_BACKEND in Variable name.
  6. Put angle_sdl2 in Variable value .
  7. Restart Python

Then I run the following in my IDE on Windows 10 and it worked for me

from kivy import Config
Config.set('graphics', 'multisamples', '0')
import os
os.environ['KIVY_GL_BACKEND'] = 'angle_sdl2'
import kivy
from kivy.app import App
from kivy.uix.label import Label

class MyApp(App):
    def build(self):
        return Label(text="Tech With Me")

if __name__== "__main__":
    MyApp().run()

Oleksii Filonenko's user avatar

answered Jun 17, 2019 at 16:25

Sagai Mangai's user avatar

This seems to be a known bug in the current version of kivy and is already reported in their issue tracker. So I guess there is no (easy) way to solve this problem. Switching back to an older version might help.

answered Jan 23, 2016 at 23:06

BDL's user avatar

BDLBDL

20.8k20 gold badges47 silver badges53 bronze badges

put this in your code and it ll work

from kivy import Config

Config.set('graphics', 'multisamples', '0')

slfan's user avatar

slfan

8,920115 gold badges65 silver badges78 bronze badges

answered Jan 30, 2018 at 19:09

abdelkarim ETTOUZANI's user avatar

answered Aug 8, 2019 at 7:15

Александр's user avatar

АлександрАлександр

3594 silver badges8 bronze badges

Try adding an environment variables for user
Variable name – KIVY_GL_BACKEND
variable value- angle_sd12

I have seen this error come up when you install kivy on a virtual environment in pip or conda.

answered May 7, 2020 at 9:08

Ritik Chawla's user avatar

I was packaging my application with pyinstaller and none of the above worked on my windows 10 machine to run a Python App.

After searching further, This is what that solved my problem.

Navigate to dist folder where your application (.exe) is.
Delete the .manifest file, named after your App name i.e (myappname.exe.manifest).

The Error should be gone now, As old as from the 90’s machines, OPenGL will be found!

answered Apr 26, 2020 at 22:00

istimons.py's user avatar

As a quick workaround, try this.

# Keep these two lines until you find what the real solution is
import os
os.environ['KIVY_GL_BACKEND'] = 'angle_sdl2'

from kivy.app import App
App().run()

tripleee's user avatar

tripleee

173k33 gold badges269 silver badges313 bronze badges

answered Jun 1, 2020 at 6:35

sharuk khan's user avatar

2

I had the same problem as said above. Simply adding angle_sdl2 to the user environment variable was enough to solve the problem—it worked for me.

loved.by.Jesus's user avatar

answered Jun 23, 2020 at 8:57

Bos's user avatar

None of above works for me.
When I use:
os.environ['KIVY_GL_BACKEND'] = 'angle_sdl2'

I get an error:
sdl2 - RuntimeError: b'Could not initialize OpenGL / GLES library'

When I use only:
Config.set('graphics', 'multisamples', '0')

I get:

OpenGL version detected: 1.1

Version: b'1.1.0'
Vendor: b'Microsoft Corporation'
Renderer: b'GDI Generic

It happens on two out of six mashines where my App.exe is installed. I’ve tried to install the newest packages kivy 1.11.1 and kivy.deps.sdl2 2.0.0 and the resoult is the same. Deleting .exe.manifest file doesn’t work too.

answered Sep 30, 2020 at 12:03

ForyszeP's user avatar

ForyszePForyszeP

1431 silver badge14 bronze badges

I remember having worked around this bug by changing the color depth of the screen (from 16bit to 32bit or vice versa).

answered Jan 24, 2016 at 7:47

sdementen's user avatar

sdementensdementen

4026 silver badges8 bronze badges

1

Versions

  • Python: 2.7.14
  • OS: Windows7
  • Kivy: v1.10.0
  • Kivy installation method: using pip

Description
i am trying to to run the kivy example app and when i run i get this error [CRITICAL] [GL ] Minimum required OpenGL version (2.0) NOT found!

OpenGL version detected: 1.1

Version: 1.1.0
Vendor: Microsoft Corporation
Renderer: GDI Generic

Try upgrading your graphics drivers and/or your graphics hardware in case of pro
blems.

The application will leave now.
i have research on the and found some solutions but none is working for eg adding

from kivy import Config
Config.set('graphics', 'multisamples', '0')

at the top of my code and it still does not work

from kivy import Config
Config.set(‘graphics’, ‘multisamples’, ‘0’)
Code and Logs

import kivy 
kivy.require('1.9.1') # replace with your current kivy version !

from kivy.app import App
from kivy.uix.label import Label

class MyApp(App):

    def build(self):
        return Label(text='Hello world')

if __name__ == '__main__':
    MyApp().run()

this are some of the picture of my computer system
driver
drivers 3
drivers2
windows
pip list
pip list

please i need help as i have been on this for more than a week today and feeling very frustrated with coding

Содержание

  1. Kivy Minimum required OpenGL version (2.0) NOT found #5640
  2. Comments
  3. Kivy fatal error opengl как исправить
  4. Technical FAQ¶
  5. Unable to get a Window, abort.¶
  6. Fatal Python error: (pygame parachute) Segmentation Fault¶
  7. undefined symbol: glGenerateMipmap¶
  8. ImportError: No module named event¶
  9. Android FAQ¶
  10. Crash on touch interaction on Android 2.3.x¶
  11. Is it possible to have a kiosk app on android 3.0 ?¶
  12. What’s the difference between python-for-android from Kivy and SL4A?¶
  13. Project FAQ¶
  14. Why do you use Python? Isn’t it slow?¶
  15. Does Kivy support Python 3.x?¶
  16. How is Kivy related to PyMT?¶
  17. Do you accept patches?¶
  18. Does the Kivy project participate in Google’s Summer of Code ?¶
  19. Build with PyInstaller, cannot find proper OpenGL after lock windows with «Win+L» #7177
  20. Comments

Kivy Minimum required OpenGL version (2.0) NOT found #5640

  • Python: 2.7.14
  • OS: Windows7
  • Kivy: v1.10.0
  • Kivy installation method: using pip

Description
i am trying to to run the kivy example app and when i run i get this error [CRITICAL] [GL ] Minimum required OpenGL version (2.0) NOT found!

OpenGL version detected: 1.1

Version: 1.1.0
Vendor: Microsoft Corporation
Renderer: GDI Generic

Try upgrading your graphics drivers and/or your graphics hardware in case of pro
blems.

The application will leave now.
i have research on the and found some solutions but none is working for eg adding

at the top of my code and it still does not work

from kivy import Config
Config.set(‘graphics’, ‘multisamples’, ‘0’)
Code and Logs

this are some of the picture of my computer system




pip list

please i need help as i have been on this for more than a week today and feeling very frustrated with coding

The text was updated successfully, but these errors were encountered:

«Standard VGA graphics adapter» — you do not appear to have a driver with OpenGL ES 2.0 support installed.

ok so what do i do now?

First make sure your graphics adapter actually supports OpenGL ES 2.0, then download and install a driver for it.

Same as bionoid said. Same as the minimal requirements. If you don’t meet them, then Kivy can’t be used on your computer.

  1. Find a OpenGL driver that works on your chip
  2. If you have DirectX 9 working, then try the ANGLE version

We cannot help if you don’t meet the minimal requirements!

@desmond75 first identify your graphics adapter (manufacturer and model number). From the window shown in your first screenshot, click «details» tab on top, then for «property» select «Hardware Ids». Right-click the top value, select copy and then search for information about it:

Alternatively you can open the computer and look at it, or search for the make and model number if it’s a laptop. Or you can try UnknownDevices (but it only lists vista support, I haven’t used this since XP days).

Once you know what graphics card you have, you can try to find drivers that support either OpenGL ES2.0 or DirectX 9. This may not be possible, if the card is too old you need a new one to use Kivy

Источник

Kivy fatal error opengl как исправить

There are a number of questions that repeatedly need to be answered. The following document tries to answer some of them.

Technical FAQ¶

Unable to get a Window, abort.¶

If Kivy cannot instantiate a Window core provider (mostly SDL2), you’ll see this. The underlying issue depends on many things:

Check your installation. Twice.

Check that your graphics driver support OpenGL 2.1 at the minimum. Otherwise, Kivy can’t run.

If you use windows and ANGLE ( KIVY_GL_BACKEND=angle_sdl2 ), check that you have DirectX 9 support.

If your platform doesn’t supports OpenGL, SDL2 cannot initialize OpenGL.

Don’t mix the architecture of the dependencies (e.g. Python 64-bit and 32-bit extensions/SDL2)

Don’t mix python installation: e.g. if you have Python and Anaconda installed, the Python actually run may be different than you think. Similarly, if you have multiple Python versions available on the PATH , they may clash.

Check your PATH to ensure that other programs in it don’t provide the same dlls as Kivy/Python, or bad stuff can happen.

This commonly happens if some other program that uses similar dependencies as Kivy adds itself to the PATH so that Kivy’s dependencies clash with theirs.

Please read this and this for more details on PATH .

The best tool to troubleshoot this is with Dependency Walker explained here and here.

But ensure that you’re launching it from the identical environment that you start Python.

Ensure you have all dependencies installed (like kivy_deps.sdl2 ).

Maybe your drivers have some missing OpenGL symbols? Try to switch to another graphics backend with KIVY_GL_BACKEND .

Fatal Python error: (pygame parachute) Segmentation Fault¶

Most of time, this issue is due to the usage of old graphics drivers. Install the latest graphics driver available for your graphics card, and it should be ok.

If not, this means you have probably triggered some OpenGL code without an available OpenGL context. If you are loading images, atlases, using graphics instructions, you must spawn a Window first:

If not, please report a detailed issue on github by following the instructions in the Reporting an Issue section of the Contributing documentation. This is very important for us because that kind of error can be very hard to debug. Give us all the information you can give about your environment and execution.

undefined symbol: glGenerateMipmap¶

You graphics card or its drivers might be too old. Update your graphics drivers to the latest available version and retry.

ImportError: No module named event¶

If you use Kivy from our development version, you must compile it before using it. In the kivy directory, do:

Android FAQ¶

Crash on touch interaction on Android 2.3.x¶

There have been reports of crashes on Adreno 200/205 based devices. Apps otherwise run fine but crash when interacted with/through the screen.

These reports also mentioned the issue being resolved when moving to an ICS or higher ROM.

Is it possible to have a kiosk app on android 3.0 ?¶

Thomas Hansen have wrote a detailed answer on the kivy-users mailing list:

Basically, you need to root the device, remove the SystemUI package, add some lines to the xml configuration, and you’re done.

What’s the difference between python-for-android from Kivy and SL4A?¶

Despite having the same name, Kivy’s python-for-android is not related to the python-for-android project from SL4A, Py4A, or android-python27. They are distinctly different projects with different goals. You may be able to use Py4A with Kivy, but no code or effort has been made to do so. The Kivy team feels that our python-for-android is the best solution for us going forward, and attempts to integrate with and support Py4A is not a good use of our time.

Project FAQ¶

Why do you use Python? Isn’t it slow?¶

Let us try to give a thorough answer; please bear with us.

Python is a very agile language that allows you to do many things in a (by comparison) short time. For many development scenarios, we strongly prefer writing our application quickly in a high-level language such as Python, testing it, then optionally optimizing it.

But what about speed? If you compare execution speeds of implementations for a certain set of algorithms (esp. number crunching) you will find that Python is a lot slower than say, C++. Now you may be even more convinced that it’s not a good idea in our case to use Python. Drawing sophisticated graphics (and we are not talking about your grandmother’s OpenGL here) is computationally quite expensive and given that we often want to do that for rich user experiences, that would be a fair argument. But, in virtually every case your application ends up spending most of the time (by far) executing the same part of the code. In Kivy, for example, these parts are event dispatching and graphics drawing. Now Python allows you to do something to make these parts much faster.

By using Cython, you can compile your code down to the C level, and from there your usual C compiler optimizes things. This is a pretty pain free process and if you add some hints to your code, the result becomes even faster. We are talking about a speed up in performance by a factor of anything between 1x and up to more than 1000x (greatly depends on your code). In Kivy, we did this for you and implemented the portions of our code, where efficiency really is critical, on the C level.

For graphics drawing, we also leverage today’s GPUs which are, for some tasks such as graphics rasterization, much more efficient than a CPU. Kivy does as much as is reasonable on the GPU to maximize performance. If you use our Canvas API to do the drawing, there is even a compiler that we invented which optimizes your drawing code automatically. If you keep your drawing mostly on the GPU, much of your program’s execution speed is not determined by the programming language used, but by the graphics hardware you throw at it.

We believe that these (and other) optimizations that Kivy does for you already make most applications fast enough by far. Often you will even want to limit the speed of the application in order not to waste resources. But even if this is not sufficient, you still have the option of using Cython for your own code to greatly speed it up.

Trust us when we say that we have given this very careful thought. We have performed many different benchmarks and come up with some clever optimizations to make your application run smoothly.

Does Kivy support Python 3.x?¶

Yes! Kivy 2.2.0.dev0 officially supports Python versions 3.7 — 3.10.

As of version 2.0.0 Kivy dropped support for Python 2. You can still use older versions with Python 2 support.

Python 3 is also supported by python-for-android and kivy-ios.

Our developers are professionals and are pretty savvy in their area of expertise. However, before Kivy came around there was (and still is) a project named PyMT that was led by our core developers. We learned a great deal from that project during the time that we developed it. In the more than two years of research and development we found many interesting ways to improve the design of our framework. We have performed numerous benchmarks and as it turns out, to achieve the great speed and flexibility that Kivy has, we had to rewrite quite a big portion of the codebase, making this a backwards-incompatible but future-proof decision. Most notable are the performance increases, which are just incredible. Kivy starts and operates just so much faster, due to these heavy optimizations. We also had the opportunity to work with businesses and associations using PyMT. We were able to test our product on a large diversity of setups and made PyMT work on all of them. Writing a system such as Kivy or PyMT is one thing. Making it work under all these different conditions is another. We have a good background here, and brought our knowledge to Kivy.

Furthermore, since some of our core developers decided to drop their full-time jobs and turn to this project completely, it was decided that a more professional foundation had to be laid. Kivy is that foundation. It is supposed to be a stable and professional product. Technically, Kivy is not really a successor to PyMT because there is no easy migration path between them. However, the goal is the same: Producing high-quality applications for novel user interfaces. This is why we encourage everyone to base new projects on Kivy instead of PyMT. Active development of PyMT has stalled. Maintenance patches are still accepted.

Do you accept patches?¶

Yes, we love patches. In order to ensure a smooth integration of your precious changes however, please make sure to read our contribution guidelines. Obviously we don’t accept every patch. Your patch has to be consistent with our styleguide and, more importantly, make sense. It does make sense to talk to us before you come up with bigger changes, especially new features.

Does the Kivy project participate in Google’s Summer of Code ?¶

Potential students ask whether we participate in GSoC. The clear answer is: Indeed. 🙂

If you want to participate as a student and want to maximize your chances of being accepted, start talking to us today and try fixing some smaller (or larger, if you can 😉 problems to get used to our workflow. If we know you can work well with us, that’d be a big plus.

Here’s a checklist:

Make sure to read through the website and at least skim the documentation.

Look at the source code.

Read our contribution guidelines.

Pick an idea that you think is interesting from the ideas list (see link above) or come up with your own idea.

Do some research yourself. GSoC is not about us teaching you something and you getting paid for that. It is about you trying to achieve agreed upon goals by yourself with our support. The main driving force in this should be, obviously, yourself. Many students come up and ask what they should do. Well, we don’t know because we know neither your interests nor your skills. Show us you’re serious about it and take initiative.

Write a draft proposal about what you want to do. Include what you understand the current state is (very roughly), what you would like to improve and how, etc.

Discuss that proposal with us in a timely manner. Get feedback.

Be patient! Especially on Discord. We will try to get to you if we’re available. If not, send an email and just wait. Most questions are already answered in the docs or somewhere else and can be found with some research. If your questions don’t reflect that you’ve actually thought through what you’re asking, it might not be well received.

Источник

Build with PyInstaller, cannot find proper OpenGL after lock windows with «Win+L» #7177

Software Versions

  • PyInstaller: 4.0
  • Python: 3.7.7
  • OS: Windows-10-10.0.19041-SP0
  • Kivy: 1.11.1
  • Kivy installation method: follow official site

Describe the bug
I’m trying to build kivy app for windows.

Build failed when calling pyinstaller with

But there is a special condition:

I started pyinstaller and logout from windows, then I’ll got following log:

But if I keep login windows, pyinstaller will run perfectly with following log:

I’m not sure how cgl_get_initialized_backend_name get backend, but it’s different in two situation from log above

Expected behavior
kivy will build normally no matter whether I logout windows or not

To Reproduce

  1. Remote login windows with mstsc.exe (Remote Desktop)
  2. Start build.py
  3. Quit mstsc.exe before counter meets 0
  4. Wait for pyinstaller done
  5. Remote login windows to check out , you can see a «Kivy Fatal Error» dialog
  6. Click «OK» on «Kivy Fatal Error» dialog, see pyinstaller continues

Code and Logs and screenshots

Code structure

build.py

demo.spec

demo.py

requirements.txt

Additional context

full log if logout

full log if keep login

The text was updated successfully, but these errors were encountered:

Источник

Table Of Contents

  • FAQ
    • Technical FAQ
      • Unable to get a Window, abort.
      • Fatal Python error: (pygame parachute) Segmentation Fault
      • undefined symbol: glGenerateMipmap
      • ImportError: No module named event
    • Android FAQ
      • Crash on touch interaction on Android 2.3.x
      • Is it possible to have a kiosk app on android 3.0 ?
      • What’s the difference between python-for-android from Kivy and SL4A?
    • Project FAQ
      • Why do you use Python? Isn’t it slow?
      • Does Kivy support Python 3.x?
      • How is Kivy related to PyMT?
      • Do you accept patches?
      • Does the Kivy project participate in Google’s Summer of Code ?

There are a number of questions that repeatedly need to be answered.
The following document tries to answer some of them.

Technical FAQ¶

Unable to get a Window, abort.¶

If Kivy cannot instantiate a Window core provider (mostly SDL2), you’ll see
this. The underlying issue depends on many things:

  • Check your installation. Twice.

  • Check that your graphics driver support OpenGL 2.1 at the minimum. Otherwise, Kivy can’t run.

  • If you use windows and ANGLE (KIVY_GL_BACKEND=angle_sdl2), check that you have DirectX 9 support.

  • If your platform doesn’t supports OpenGL, SDL2 cannot initialize OpenGL.

  • Don’t mix the architecture of the dependencies (e.g. Python 64-bit and 32-bit extensions/SDL2)

  • Don’t mix python installation: e.g. if you have Python and Anaconda installed, the Python actually run may be different than you think. Similarly, if you have multiple Python versions available on the PATH, they may clash.

  • Check your PATH to ensure that other programs in it don’t provide the same dlls as Kivy/Python, or bad stuff can happen.

    • This commonly happens if some other program that uses similar dependencies as Kivy adds itself to the PATH so that Kivy’s dependencies clash with theirs.

    • Please read this and this for more details on PATH.

    • The best tool to troubleshoot this is with Dependency Walker explained here and here.

    • But ensure that you’re launching it from the identical environment that you start Python.

  • Ensure you have all dependencies installed (like kivy_deps.sdl2).

  • Maybe your drivers have some missing OpenGL symbols? Try to switch to another graphics backend with KIVY_GL_BACKEND.

  • Maybe your Pycharm configuration is incorrect.

Fatal Python error: (pygame parachute) Segmentation Fault¶

Most of time, this issue is due to the usage of old graphics drivers. Install the
latest graphics driver available for your graphics card, and it should be ok.

If not, this means you have probably triggered some OpenGL code without an
available OpenGL context. If you are loading images, atlases, using graphics
instructions, you must spawn a Window first:

# method 1 (preferred)
from kivy.base import EventLoop
EventLoop.ensure_window()

# method 2
from kivy.core.window import Window

If not, please report a detailed issue on github by following the instructions
in the Reporting an Issue section of the Contributing documentation.
This is very important for us because that kind of error can be very hard
to debug. Give us all the information you can give about your environment and
execution.

undefined symbol: glGenerateMipmap¶

You graphics card or its drivers might be too old. Update your graphics drivers to the
latest available version and retry.

ImportError: No module named event¶

If you use Kivy from our development version, you must compile it before
using it. In the kivy directory, do:

Android FAQ¶

Crash on touch interaction on Android 2.3.x¶

There have been reports of crashes on Adreno 200/205 based devices.
Apps otherwise run fine but crash when interacted with/through the screen.

These reports also mentioned the issue being resolved when moving to an ICS or
higher ROM.

Is it possible to have a kiosk app on android 3.0 ?¶

Thomas Hansen have wrote a detailed answer on the kivy-users mailing list:

Basically, you need to root the device, remove the SystemUI package, add some
lines to the xml configuration, and you’re done.

What’s the difference between python-for-android from Kivy and SL4A?¶

Despite having the same name, Kivy’s python-for-android is not related to the
python-for-android project from SL4A, Py4A, or android-python27. They are
distinctly different projects with different goals. You may be able to use
Py4A with Kivy, but no code or effort has been made to do so. The Kivy team
feels that our python-for-android is the best solution for us going forward,
and attempts to integrate with and support Py4A is not a good use of our time.

Project FAQ¶

Why do you use Python? Isn’t it slow?¶

Let us try to give a thorough answer; please bear with us.

Python is a very agile language that allows you to do many things
in a (by comparison) short time.
For many development scenarios, we strongly prefer writing our
application quickly in a high-level language such as Python, testing
it, then optionally optimizing it.

But what about speed?
If you compare execution speeds of implementations for a certain set of
algorithms (esp. number crunching) you will find that Python is a lot
slower than say, C++.
Now you may be even more convinced that it’s not a good idea in our
case to use Python. Drawing sophisticated graphics (and we are
not talking about your grandmother’s OpenGL here) is computationally
quite expensive and given that we often want to do that for rich user
experiences, that would be a fair argument.
But, in virtually every case your application ends up spending
most of the time (by far) executing the same part of the code.
In Kivy, for example, these parts are event dispatching and graphics
drawing. Now Python allows you to do something to make these parts
much faster.

By using Cython, you can compile your code down to the C level,
and from there your usual C compiler optimizes things. This is
a pretty pain free process and if you add some hints to your
code, the result becomes even faster. We are talking about a speed up
in performance by a factor of anything between 1x and up to more
than 1000x (greatly depends on your code). In Kivy, we did this for
you and implemented the portions of our code, where efficiency really
is critical, on the C level.

For graphics drawing, we also leverage today’s GPUs which are, for
some tasks such as graphics rasterization, much more efficient than a
CPU. Kivy does as much as is reasonable on the GPU to maximize
performance. If you use our Canvas API to do the drawing, there is
even a compiler that we invented which optimizes your drawing code
automatically. If you keep your drawing mostly on the GPU,
much of your program’s execution speed is not determined by the
programming language used, but by the graphics hardware you throw at
it.

We believe that these (and other) optimizations that Kivy does for you
already make most applications fast enough by far. Often you will even
want to limit the speed of the application in order not to waste
resources.
But even if this is not sufficient, you still have the option of using
Cython for your own code to greatly speed it up.

Trust us when we say that we have given this very careful thought.
We have performed many different benchmarks and come up with some
clever optimizations to make your application run smoothly.

Does Kivy support Python 3.x?¶

Yes! Kivy 2.2.0rc1 officially supports Python versions 3.7 – 3.11.

As of version 2.0.0 Kivy dropped support for Python 2. You can still use older versions with
Python 2 support.

Python 3 is also supported by python-for-android and kivy-ios.

Do you accept patches?¶

Yes, we love patches. In order to ensure a smooth integration of your
precious changes however, please make sure to read our contribution
guidelines.
Obviously we don’t accept every patch. Your patch has to be consistent
with our styleguide and, more importantly, make sense.
It does make sense to talk to us before you come up with bigger
changes, especially new features.

Does the Kivy project participate in Google’s Summer of Code ?¶

Potential students ask whether we participate in GSoC.
The clear answer is: Indeed. 🙂

If you want to participate as a student and want to maximize your
chances of being accepted, start talking to us today and try fixing
some smaller (or larger, if you can 😉 problems to get used to our
workflow. If we know you can work well with us, that’d be a big plus.

Here’s a checklist:

  • Make sure to read through the website and at least skim the documentation.

  • Look at the source code.

  • Read our contribution guidelines.

  • Pick an idea that you think is interesting from the ideas list (see link
    above) or come up with your own idea.

  • Do some research yourself. GSoC is not about us teaching you something
    and you getting paid for that. It is about you trying to achieve agreed upon
    goals by yourself with our support. The main driving force in this should be,
    obviously, yourself. Many students come up and ask what they should
    do. Well, we don’t know because we know neither your interests nor your
    skills. Show us you’re serious about it and take initiative.

  • Write a draft proposal about what you want to do. Include what you understand
    the current state is (very roughly), what you would like to improve and how,
    etc.

  • Discuss that proposal with us in a timely manner. Get feedback.

  • Be patient! Especially on Discord. We will try to get to you if we’re available.
    If not, send an email and just wait. Most questions are already answered in
    the docs or somewhere else and can be found with some research. If your
    questions don’t reflect that you’ve actually thought through what you’re
    asking, it might not be well received.

Good luck! 🙂

Я решил сделать некоторое программирование на кросс-платформе Kivy и успешно установить Kivy на свой компьютер. Проблема в том, что когда я запускаю свой код, я получаю эту ошибку:

[INFO              ] [Kivy        ] v1.9.1
[INFO              ] [Python      ] v3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 20:20:57) [MSC v.1600 64 bit (AMD64)]
[INFO              ] [Factory     ] 179 symbols loaded
[INFO              ] [Image       ] Providers: img_tex, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored)
[INFO              ] [OSC         ] using <thread> for socket
[INFO              ] [Window      ] Provider: sdl2
[INFO              ] [GL          ] GLEW initialization succeeded
[INFO              ] [GL          ] OpenGL version <b'1.1.0'>
[INFO              ] [GL          ] OpenGL vendor <b'Microsoft Corporation'>
[INFO              ] [GL          ] OpenGL renderer <b'GDI Generic'>
[INFO              ] [GL          ] OpenGL parsed version: 1, 1
[CRITICAL          ] [GL          ] Minimum required OpenGL version (2.0) NOT found!

OpenGL version detected: 1.1

Version: b'1.1.0'
Vendor: b'Microsoft Corporation'
Renderer: b'GDI Generic'

Try upgrading your graphics drivers and/or your graphics hardware in case of problems.

The application will leave now.

И появляется это окно ошибки:

Изображение 40690

Я проверил версию OpenGL моего GPU через GPU Caps Viewer, проверив меня до версии OpenGL версии 2.1, но Kivy каким-то образом не обнаруживает OpenGL 2.1 и по умолчанию использует GDI Generic от Microsoft. Я провел некоторое исследование в Интернете и выяснил, что лучший способ решить эту проблему – обновить драйвер графической карты от производителя графической карты, но это не помогло мне.

Я обновил свои графические драйверы (я запускаю NVIDIA GeForce GT 435M на 64-битной Windows 8).

Мой вопрос: Есть ли способ, чтобы Kivy переключился с GDI Generic на драйвер NVIDIA? Или есть проблема где-то еще?

Добавить комментарий