
Kivy 1.10.0 released - ofek
https://groups.google.com/d/msg/kivy-users/2zusmq8NXPE/5hfqtIoACAAJ
======
Mandatum
There appears to be a multi-step process to install Kivy on Windows. Isn't the
whole point of pip to not have to worry about that?

I was expecting "pip install kivy" > "python helloworld.py" > done

Instead I got "install these things", "if you're using this version install
this other thing", "cool now install kivy".

I went ahead and tried to package a Windows app using their recommended method
(PyInstaller), and PyInstaller doesn't support current version of Python.

Thought I'd take a look at other offerings, for iOS there's a weird project-
mirror XCode generator script. Android isn't any better.

I mean, this is more of a reflection on the disparity across different
platforms and packaging tools rather than Kivy itself. There's a reason some
large Enterprises won't touch all of these tiny, moving, fragile tech.

In saying all of that, I think Kivy has some very nice points. The examples
are straightforward, and to-the-point, covering a lot of use cases. However I
think having this as a >1.0 versioned release is kind of crazy. When comparing
this to other frameworks, why would you ever choose this? Aside from "I like
Python"? Definitely shows a lot of promise, but I think sitting in sub 1 state
for a while like Rust until you've got something going for you would help with
adoption and on-boarding.

EDIT: Tried to use PyInstaller from source, no luck - SDL required. Found a
closed bug report which explains how to fix it - the "optional" library has to
be installed for PyInstaller to work. Go figure.
[https://github.com/kivy/kivy/issues/4482](https://github.com/kivy/kivy/issues/4482)

~~~
e12e
Python with c modules (kivy relies heavily on cython) is still a bit tricky on
windows. But binary wheels have made distribution a bit easier - ideally "pip
install kivy" should work, for now I think the easiest path is to download
relevant wheels, install dependencies with pip, and then install the relevant
wheel (pip install kivy-version.whl). I did at least get it to work fairly
easily following the instructions at:

[https://kivy.org/docs/installation/installation-
windows.html](https://kivy.org/docs/installation/installation-windows.html)

last time I tried. Still work to be done, though :/

~~~
usmeteora
I work with Kivy in Windows at work using pip. I tried binary wheels but
manually installing can be tricky with windows, but not impossible.

Kivy and its modules install fine using Kivy with me. The issues I had were
setting up the correct path variables in Windows.

You need Python\Scripts and Python in your Windows path like so:

C:\Python34\Scripts;C:\Python34;

Please note, another issue you might run into is if you have two different
version of Python on your machine. You might already have an older versions of
python and not realize it, which can make setting it up difficult.

I had to take Python 2.7 out of my path, and Windows seems to only want one
version in it's path at a time, from my limited experience.

Work Firewalls (obvious but some people still report troubles for installing
due to this when its not a python issue or Kivy issue, just a work
environment)

depending on your work environment (I assume anyone working with Windows is
doing it because they have to due to work environments) you will need to
potentially (with sys admin approval of course) install by bypassing a
firewall.

I work at an extremely locked down secure environment and the only issues I
had installing Kivy and its modules were working with my IT department to work
with security protocols and firewalls, and I'm running Windows 7 even.

I highly recommend Kivy for desktop only based Apps and it renders some
beautiful phone apps as well. I am looking into electron for desktop apps too,
but I did alot of research on this and Kivy is a really good option even over
qt in my opinion.

The only issue I have is its lack of ability to do node based plotting. It's
more of a physics engine based environment and good for Dashboard settings and
real time chronological plotting, music apps, interactive games as it has an
embedded webgl library and touchscreen binding events.

There is a matplotlib module but honestly who wants a screen shot of a matlab
plot in Kivy?

You can install NetworkX with WebGL but it is outdated for Python 3.4

On my long list of todos is getting a node based graphing module wrapped for
Kivy.

if you will be continuing to develop in Kivy, I highly recommend r/kivy. It's
moderators are alive, well and responsive and it is a good community for Kivy
dev.

~~~
e12e
Note that python3.4 is pretty old - in particular 3.5 fixed a few things - and
3.6 has been out a little while. So for anyone else that's coming into this
for the first time, I'd recommend the latest stable, official python (3.6.1 at
the time of this writing). The official python is built with/works with Visual
Studio (the community version works fine) - and with hooking off "add python
to path" in the python installer along with first installing Microsoft Visual
studio command line build tools/compiler -- most regular python packages
should install nicely with with pip.

For your own sanity, please do use "virtual environments" (venvs) -- now
officially part of python:

    
    
      python -m venv kivy-venv
    

Will create a python3 venv in a folder called "kivy-venv" \-- that can be
activated in powershell via the script: "kivy-venv\Scripts\Activate.ps1". Then
commands like "pip" will be run in the context of that venv, and not mess with
system python.

For reasons I don't fully understand, the official python binary on all other
platforms, post python 3, is "python3", while on windows it remains "python".
This leads to some additional conflicts on windows if both python 2 an 3 are
installed.

You can also install python in your user profile - and if you do so, running
the default installed pip outside of an activated python virtual environment
will mess up your install (and/or fail).

Always use a venv when doing anything in python. The only exception is if
you're creating your own linux/os distribution, and want python to power part
of your distribution tooling (eg: the package manager, like "apt").

------
jitl
Has anyone here ever used Kivy for something? What did you build? How did it
go? Would you use Kivy for a project again in the future?

~~~
mortadelegle
I made
[https://github.com/AlvarBer/Persimmon](https://github.com/AlvarBer/Persimmon),
I would say Kivy is pretty capable.

My biggest caveat is the kV lang, when you get to dynamic components you
almost always have to either give up and do the ugly manual bindings by hand,
or hardcode a lot of values.

~~~
ghostly_s
Wow, this looks really cool! On my list to check out.

------
iamcreasy
Can somebody tell how easy it is to build fully custom GUI components with
Kivy(including custom animations)?

~~~
usmeteora
It utilizes OpenGL and you can bind those objects to your own user defined
physics with resources and actions, much like javascript binds to events.

you can see the WebGL shapes objects and components they have in the Kivy
library, which is very nicely documented online.

OpenGl and Kivy are opensource so you should be able to make a wrapper module
install, which would be similiar to an npm package in javascript, for Kivy,
which would be a combination of Python and OpenGL if you wanted to create your
own SDL components.

------
zabana
Any examples of Desktop GUI apps built using Kivy ?

------
giis
Used Kivy for Desktop-GUI for one of my oss-project. It was quite easy to
learn and create (if you already know python). Much easier/quicker then
creating GTK+ application. (created GTK+ GUI long time ago, not sure whether
things changed recently)

When I tried to use it to make Android apps, unfortunately, apps are slow and
needs more disk-space.I also had trouble creating packages with Buildozer.I
wanted to avoid Java at all cost, but left with no-other option to go with
Java for Android.

If you plan to start with Kivy, use their pre-built VM to avoid installation
steps.

~~~
mixmastamyk
Sorry no, do not use the VM, it is outdated. Additionally, buildozer has
improved, and has worked well on Android in my experience.

I don't find apps to be slow, and I'm using it primarily on a several year old
nexus 10.

~~~
mixedCase
The apps are not slow, the problem is initialization. From what I gathered
from talking to various core devs the interpreter is to blame and there's no
solution for it.

~~~
mixmastamyk
There is an unpacking step on first run, but after that loading isn't
noticeable on my several year old tablet.

~~~
mixedCase
It is very much noticeable in my Galaxy S3 and in a tablet I have for testing
releases (7-10 seconds easily).

Unfortunately that rules it out for a lot of things.

~~~
mixmastamyk
What is it doing at that time? "adb logcat" might shed some light.

------
itgoon
I just started playing with this a couple of days ago.

I use conda on Windows, and it installed without any issue.

It's pretty easy to get started and crank out a usable UI. My toy app isn't
sophisticated (service status for one service :) ), but it only took a couple
of hours to whip together. It works fine, and looks pretty.

In contrast, I've used the Qt bindings for awhile, and they took a bit more
effort for the same results.

I can't speak to the performance, or the cross-platform capability. For a
quick and dirty utility it worked just fine, and I can see doing larger things
with it.

------
thehardsphere
I've never used Kivy. Is it really all that great?

I mean, the last time I looked at it, it seemed like it has a lot of moving
parts that are all pretty heavy that you could just use directly if you really
wanted to and still get similar results. Like how they were (didn't check if
they still are) using pygame to interface with SDL to do rendering a lot of
other things. I've seen other projects that used pygame on mobile devices that
were able to do it without all of the extra complexity that Kivy layers on.
Pygame isn't that hard to use, so if I know how to use it, why would I use
Kivy?

~~~
inclemnet
> Like how they were (didn't check if they still are) using pygame to
> interface with SDL to do rendering a lot of other things.

Kivy only ever used Pygame for SDL's backend management, drawing has always
used OpenGL. We actually no longer use Pygame by default, having moved instead
to SDL2. There are also alternative backends for almost everything, e.g. a
direct X11 window backend on Linux, or the rpi window backend that does not
require X.

> I've seen other projects that used pygame on mobile devices that were able
> to do it without all of the extra complexity that Kivy layers on

Do you have any examples? I'm aware of almost none, or any active build tools
for Pygame. I've been wondering if the best way to use Pygame on Android would
be via pygame_sdl2 using Renpy or python-for-android, but it would be nice to
find an alternative.

> all of the extra complexity that Kivy layers on. Pygame isn't that hard to
> use, so if I know how to use it, why would I use Kivy?

I'm not sure what is meant by 'extra complexity' unless you're referring to
Kivy itself being an extra module to install. Kivy isn't a Pygame wrapper, but
its own toolkit with a very different, OpenGL based drawing API. It's probably
also more performant, especially when optimised (e.g. KivEnt
[http://kivent.org/](http://kivent.org/)). Even ignoring performance etc.,
you'd want to use Kivy if you just prefer how it works (but you don't have to
feel that way).

Beyond this, Kivy doesn't just have the graphics API but an entire widget
toolkit. It also directly supports both Android and iOS, although as above
perhaps I'm not aware of current Pygame efforts.

~~~
thehardsphere
>Kivy only ever used Pygame for SDL's backend management, drawing has always
used OpenGL. We actually no longer use Pygame by default, having moved instead
to SDL2. There are also alternative backends for almost everything, e.g. a
direct X11 window backend on Linux, or the rpi window backend that does not
require X.

Ahh, OK. I'll have to check that again. It's been more than a few years since
I last looked at it. I guess though I did find the idea of using pygame just
for SDL to be kind of... blunt. Though there weren't very many other good
python to SDL wrappers (which is like, not all of what pygame is used for).

>> I've seen other projects that used pygame on mobile devices that were able
to do it without all of the extra complexity that Kivy layers on

>Do you have any examples? I'm aware of almost none, or any active build tools
for Pygame. I've been wondering if the best way to use Pygame on Android would
be via pygame_sdl2 using Renpy or python-for-android, but it would be nice to
find an alternative.

I was actually thinking of Renpy or python-for-android. Again, my initial
impressions about this are several years old, and I didn't actually get that
far past the initial evaluation of it for what I was thinking of using it for
before moving on to other projects.

> I'm not sure what is meant by 'extra complexity' unless you're referring to
> Kivy itself being an extra module to install. Kivy isn't a Pygame wrapper,
> but its own toolkit with a very different, OpenGL based drawing API. It's
> probably also more performant, especially when optimised (e.g. KivEnt
> [http://kivent.org/](http://kivent.org/)). Even ignoring performance etc.,
> you'd want to use Kivy if you just prefer how it works (but you don't have
> to feel that way).

I think I didn't at the time, because I already felt kind of comfortable with
how SDL/pygame did things. But I should look into that again.

>Beyond this, Kivy doesn't just have the graphics API but an entire widget
toolkit. It also directly supports both Android and iOS, although as above
perhaps I'm not aware of current Pygame efforts.

Yeah, I didn't need the widgets at the time either, and mobile was only a
secondary concern. I should look at Kivy again one of these days...

~~~
inclemnet
> I guess though I did find the idea of using pygame just for SDL to be kind
> of... blunt

Yeah, I think this was a pragmatic choice (it was before I was involved at
all), but it was never that great. SDL2 has solved a lot of problems and is
much easier to support.

> I was actually thinking of Renpy or python-for-android.

python-for-android is Kivy's own Android build tool, which nowadays is a
separate project. It supports multiple backends, but doesn't really support
pygame except as a Kivy backend (which is not maintained much any more). It
does support SDL2, so you can use e.g. PySDL2 to make Android apps.

I think Renpy also moved to SDL2, probably also due to issues supporting
Pygame, although last I checked they use a fork of Kivy's older python-for-
android toolchain.

------
bradknowles
Does kivy work on iOS? I went to their website and it seems to be static in
content.

~~~
helb
It says that _" Kivy runs on Linux, Windows, OS X, Android and iOS."_ on the
website (first paragraph under _" Cross platform"_).

