sdl2 - ImportError: DLL load failed: The specified module could not be found and [CRITICAL] [App] Unable to get a Window, abort

后端 未结 2 1096
情书的邮戳
情书的邮戳 2020-12-03 05:03
  • Python: 3.6.4
  • OS: Windows 10
  • Kivy: 1.10.0

Kivy Installation Method

python -m pip install --upgrade pip wheel setupto         


        
相关标签:
2条回答
  • 2020-12-03 05:56

    I had the very same problem, and for me the solution was to make use of virtualenv instead of venv. This forces Kivy to use a specific installation of Python.

    1. Download and install Python 3.7, since 3.8 doesn't seem to be supported yet (https://www.python.org/downloads/release/python-376/)

    2. Install virtualenv if not already installed

      pip install virtualenv

    3. Create a virtual environment, specifying the path to the newly installed Python version

      virtualenv --python=C:\path\to\Python37\python.exe my_venv

    4. Activate the new virtual environment

      my_venv/Scripts/activate.bat

    5. Install kivy according to Javapocalypse's answer

      python -m pip install --upgrade pip wheel setuptools
      
      python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew extra-index-url https://kivy.org/downloads/packages/simple/
      
      python -m pip install kivy
      
    0 讨论(0)
  • 2020-12-03 05:57

    I had the same problem. I solved it by first Kivy and its dependencies.

    python -m pip uninstall kivy
    
    python -m pip uninstall kivy.deps.sdl2
    
    python -m pip uninstall kivy.deps.glew
    
    python -m pip uninstall kivy.deps.gstreamer
    
    python -m pip uninstall image
    

    Now reinstalling everything except gstreamer.

    python -m pip install --upgrade pip wheel setuptools
    
    python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew --extra-index-url https://kivy.org/downloads/packages/simple/
    
    python -m pip install kivy
    

    It solved the error. Credits to Ben R's Answer.

    0 讨论(0)
提交回复
热议问题