Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to resolve "No matching distribution found for kivy.deps.sdl2" installation error? #6038

Closed
E3V3A opened this issue Nov 5, 2018 · 16 comments

Comments

@E3V3A
Copy link

E3V3A commented Nov 5, 2018

I'm trying to install Kivy according to (what now seem outdated?) your installation instructions. However, I run into the following error.

Collecting kivy.deps.sdl2
  Could not find a version that satisfies the requirement kivy.deps.sdl2 (from versions: )
No matching distribution found for kivy.deps.sdl2

I don't understand what this means, because certainly the package is available in pip3 search:

kivy.deps.sdl2 (0.1.18)           - Repackaged binary dependency of Kivy.
kivy.deps.sdl2_dev (0.1.18)       - Repackaged binary dependency of Kivy.

So what is the problem and solution?

BTW. I am using latest Cygwin on x64 with Python 3.6 and all updated pips.

PS. This also seem related to:

@matham
Copy link
Member

matham commented Nov 6, 2018

We don't support cygwin - hence the error. See also #2623.

I'm guessing you'd need to manually install deps and compile kivy, but never tried it. Please ask on the mailing list for further help.

@matham matham closed this as completed Nov 6, 2018
@matham
Copy link
Member

matham commented Nov 6, 2018

More specifically for your error, windows wheels won't work on cygwin.

@E3V3A
Copy link
Author

E3V3A commented Nov 6, 2018

Hi @matham,

Actually it work quite well, when not following your installation instructions!

It's just too bad that dev community always need to frown upon Cygwin, which I always need to remind people is based on Fedora, and is better maintained than most pip packages are!

So by partially following you expired windows instructions, and that for linux. I got Kivy to run after some package massaging and trial-and-error.

The reason I started on this little quest, is that I wanted to make some simple python based GUI to my otherwise purely CLI tools. However, since I am totally new to GUI development, I was under the impression that running any python package in windows, would have allowed me to easily use the windows API to do so. Boy was I wrong! It's amazing the number of complications caused by the lacking compatibility between Windows API and any other common *nix API, even when it comes to making simple shit, like a window with "Hello World".

To summarize:

# Check for outdated packages:
pip3 list --outdated

# Ensure you have the latest pip and wheel:
# easy_install --upgrade pip
pip3 install --upgrade pip wheel setuptools

# Install the dependencies:
pip3 install cython
pip3 install pygments docutils

# skip all this shit, because they don't seem to work (and can't be installed)
#pip3 install pypiwin32 kivy.deps.sdl2 kivy.deps.glew

#--------------------------------------
# Installing similar Cygwin packages:
#--------------------------------------
apt-cyg install gstreamer1.0
apt-cyg install libgstreamer1.0-devel
apt-cyg install mingw64-x86_64-gstreamer1.0

apt-cyg install gstreamer1.0-plugins-good           # Warning shitload of dependencies!
apt-cyg install mingw64-x86_64-gstreamer1.0-plugins-good   # Warning shitload of dependencies! Crazy! (plugins-base, gcc i686 etc)

#--------------------------------------
# Installing SDL2
#--------------------------------------
# Install SDL2 minimal??
apt-cyg install mingw64-x86_64-SDL2 libSDL2-devel

# Probably these too..
apt-cyg install libSDL2_2.0_0 
apt-cyg install glew libGLEW2.1 mingw64-x86_64-glew

# Check:
sdl2-config --version --cflags --libs
##  2.0.7
##  -I/usr/include/SDL2 -D_REENTRANT
##  -L/usr/lib -lSDL2

# link missing sdl-config to present sdl2-config (just a bash-script! -- probably the same)
# http://manpages.ubuntu.com/manpages/xenial/man1/sdl2-config.1.html
ln -s /usr/bin/sdl2-config /usr/bin/sdl-config

#--------------------------------------
# Installing pygame (don't!)
#--------------------------------------
apt-cyg install libportmidi-devel python3-portmidi libSDL2_ttf-devel

# Can always try this, but will fail
pip3 install pygame --no-cache-dir
## <error> 

pip3 uninstall pygame
# Instead use:
apt-cyg install python3-pygame

# Test pygame: (not enough!)
python3 -c "import pygame; print(pygame.__version__)"
##1.9.3

python3 -m pygame.examples.midi --list
## 0: interface :b'MMSystem':, name :b'Microsoft MIDI Mapper':, opened :0:  (output)
## 1: interface :b'MMSystem':, name :b'Microsoft GS Wavetable Synth':, opened :0:  (output)

python3 -m pygame.examples.aliens
## <error> ==>  video system not initialized

#--------------------------------------
# Installing Kivy on Cygwin & Python3
#--------------------------------------
# Install kivy (will also install: Kivy-Garden) and include kivy-examples:
pip3 install Kivy --no-cache-dir

You can now make some tests of Kivy, with the following results:

# Test-1
# python3 -c "import pkg_resources; print(pkg_resources.resource_filename('kivy', ' /usr/share/kivy-examples'))"

[INFO   ] [Logger      ] Record log in /home/xxxx/.kivy/logs/kivy_18-11-06_24.txt
[INFO   ] [Kivy        ] v1.10.1
[INFO   ] [Python      ] v3.6.4 (default, Jan  7 2018, 15:53:53)
[GCC 6.4.0]
/usr/lib/python3.6/site-packages/kivy/ /usr/share/kivy-examples


# Test-2
# python3 /usr/share/kivy-examples/demo/showcase/main.py

[INFO   ] [Logger      ] Record log in /home/xxxx/.kivy/logs/kivy_18-11-06_25.txt
[INFO   ] [Kivy        ] v1.10.1
[INFO   ] [Python      ] v3.6.4 (default, Jan  7 2018, 15:53:53)
[GCC 6.4.0]
[INFO   ] [Factory     ] 194 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_pygame, img_pil, img_gif (img_ffpyplayer ignored)
[INFO   ] [Window      ] Provider: pygame
[CRITICAL] [Window      ] Unable to find any valuable Window provider.
pygame - AttributeError: 'error' object has no attribute 'message'
  File "/usr/lib/python3.6/site-packages/kivy/core/__init__.py", line 67, in core_select_lib
    cls = cls()
  File "/usr/lib/python3.6/site-packages/kivy/core/window/__init__.py", line 968, in __init__
    self.create_window()
  File "/usr/lib/python3.6/site-packages/kivy/core/window/window_pygame.py", line 59, in create_window
    raise CoreCriticalException(e.message)

[CRITICAL] [App         ] Unable to get a Window, abort.

So Kivy do work to some extent if I install X-windows, but my mission was to:

  • use a native Windows API/GUI for my window.

But from what I can see, I suppose that is only possible when using Mingw?
(Or do you know of any other alternative option?)

@E3V3A
Copy link
Author

E3V3A commented Nov 6, 2018

This issue is also related to a whole bunch of others, such as:


@matham

- Instead of continuously closing every daily issue and circularly referring to some dead 
- chat channels and the same misleading installation pages, perhaps you should consider 
- updating your crappy documentation and address some of these super common issues right here? 

+ I promise you, it would save you a whole lot of trouble, and a lot of repeated 
+ cross communications in your chat channels. 

👍 ❤️

@matham
Copy link
Member

matham commented Nov 7, 2018

As I said, we don't officially support cygwin hence the issues you ran into. Our installation pages work well for windows, but one should not expect to be able to install msvc compiled wheels (from pypi) in cygwin. For that you need wheels compiled with cygwin, which we don't make as we don't seem to have much shared users, nor maintainers using it and limited time.

Alternatively, as you found out and as I mentioned in my initial reply, you can probably compile all the deps yourself and then kivy, cutting out the need of any pre-compiled wheels. To do that, you can look at our linux installation instructions as that is more relevant.

Regarding mingw/msys2, that would possibly be easier to use, but I'm not sure. For py2, you can probably use mingw's python from pacman and then pip install our wheels because our py2 wheels are compiled with mingw. For py3.5+ we only have msvc wheels because python doesn't support mingw (https://bugs.python.org/issue4709) yet (although that may have changed) so you'd need to compile all the deps yourself in mingw.

Regarding your last comment, I do not appreciate your tone and your words - I find them quite inappropriate because we try to maintain a civil and welcoming community both for users and maintainers.

Specifically regarding the issues you mentioned:

  • We moved our chat from IRC to discord recently, but it is quite clearly shown in the IRC welcome message. We also updated all our links on the site to point to discord (except in old messages of course). If you find old links, please report it.
  • Our documentation is clearly separated by OS. If you follow the instructions for your OS it should be clear, generally. We don't have docs for cygwin though, as I said, because we don't officially support it.
  • Most of the issues you linked are unrelated to your issue.
  • Similarly, the pip errors people typically encounter is due to a multitude of unrelated issues, such as following the instructions for the wrong OS. Or from the past when we were still working on getting the wheels for all python versions.

If you arrive at a working cygwin install, you're welcome to post the instructions on the wiki and link it here

@mkortink
Copy link

mkortink commented Oct 12, 2020

I agree with the Cygwin guy but also appreciate that the Kivy guys are doing their best and can't solve everything. Having said that I have a similar but different problem.

  • I have been using Kivy successfully on Win10 using VSCode for developing my app.
  • To distribute my app I want to use buildozer to create my .apk file. Buildozer doesn't work with windows, frustratingly it works up to the very last step in a long list of steps then fails.
  • So I have installed WSL2 on Win10 and Ubuntu and VSCode all into Win10 and it all works beautifully.
  • BUT following the Kivy install instructions for Linux I get the "kivy_deps.sdl2==0.1.*" error.
  • WSL2 is a Linux kernel in Windows, this should not happen???

PS. After trying pip I found this and tried it.
https://kivy.org/doc/stable/installation/installation-linux.html#ubuntu-kubuntu-xubuntu-lubuntu-saucy-and-above

The sudo commands all seemed to run successfully in WSL2 and in VSCode with the venv activated.
BUT the kivy app and its dependencies did not show up in my venv folder, not sure where they went?
I am a beginner as far as Linux is concerned so maybe I am just stabbing in the dark, but at least they ran, I just need to get all the kivy stuff to install in my venv.

@Roshan-yadav-evil-genius

Hii Bro use 3.9 version of python which help you to solve thise problem

@ilikepenguins42
Copy link

hey, I use pip version 3.10... the pretty latest one; will this help with the same problem??

@ilikepenguins42
Copy link

image

@ilikepenguins42
Copy link

im getting this
its getting stuck on inst kivy 1.11.1.tar.gz

@esdras-calhau
Copy link

esdras-calhau commented Dec 7, 2021

@ilikepenguins42 I get the same error. I'm trying to solve this for 3 hours and i got no answer. I don't no what to do now, did u got an answer?
Screenshot_1
Please tell me u got an answer!

@ilikepenguins42
Copy link

ilikepenguins42 commented Dec 8, 2021

yep! as of now Kivy does not support Python 3.10 and new versions, kivy developers need some time to do that. nobody knows the exact day of release, till that sees the light I have uninstalled python 3.10 and installed python 3.9.7 and it's working perfectly ......when the support releases I am gonna switch back to the new version

@CharacterNerd

@Anantat
Copy link

Anantat commented Dec 13, 2021

same problem
using py 3.10

@Roshan-yadav-evil-genius

Hey pythonists kivy not support python version 3.10 so use python 3.9.8

@yshashanky
Copy link

I am getting a similar while installing Kivy on my windows.
image
I am using Python 3.11 and as per kivy doc it supports that. Can someone help me with it.

@Rob1c
Copy link

Rob1c commented Apr 11, 2023

Hi guys,
for all who have the error: subprocess-exited-with-error , like @yshashanky ,
use this two commands:

python -m pip install kivy --pre --no-deps --index-url https://kivy.org/downloads/simple/
python -m pip install "kivy[base]" --pre --extra-index-url https://kivy.org/downloads/simple/

I had the same problem and with this ones I resolved all (thanks @misl6 ).
But I've another problem,
when I go on python and I write:
from kivy.app import App
The cpu still marks me as errors both "kivy.app", and "App".
Thanks in advance ☺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants