Termux on Android - Error in installing Kivy Python module

3,313 views
Skip to first unread message

Giovanni Bucci

unread,
Apr 5, 2018, 8:43:30 AM4/5/18
to Kivy users support
Hi All,
In android 5.1.1 I have installed Python 3.6.4 and 2.7.14. I need to run an app with graphical interface by using kivy.
If I execute the command 

pip install kivy 

I receive this error message.

Collecting kivy
  Using cached Kivy-1.10.0.tar.gz
    Complete output from command python setup.py egg_info:
    Using distutils
    
    Cython is missing, it's required for compiling kivy !
    
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/data/data/com.termux/files/usr/tmp/pip-build-ImJBAz/kivy/setup.py", line 219, in <module>
        from Cython.Distutils import build_ext
    ImportError: No module named Cython.Distutils
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-build-1Syryn/kivy/

Any help will be greatly appreciated.
Thanks in advance for your kind support.
Regards,

      Giovanni


Daniel Lim

unread,
Apr 5, 2018, 12:18:33 PM4/5/18
to Kivy users support
HI Giovanni,

Kivy require Cython. Please install Cython using sudo pip install --upgrade Cython==0.25.2

Giovanni Bucci

unread,
Apr 5, 2018, 7:21:14 PM4/5/18
to Kivy users support
Hi Daniel,
Thanks for your reply and support. Unfortunally, after the execution of the command

pip install kivy 

I receive this new error message.


Collecting kivy
  Using cached Kivy-1.10.0.tar.gz
    Complete output from command python setup.py egg_info:
    Using distutils
   
    Detected Cython version 0.25.2
    Using this graphics system: OpenGL
    WARNING: A problem occurred while running pkg-config --libs --cflags gstreamer-1.0 (code 127)
   
    /data/data/com.termux/files/usr/bin/sh: 1: pkg-config: not found
    
    WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 127)
   
    /data/data/com.termux/files/usr/bin/sh: 1: pkg-config: not found

       
     Traceback (most recent call last):
       File "<string>", line 1, in <module>
       File "/data/data/com.termux/files/usr/tmp/pip-build-v6O_VB/kivy/setup.py", line 934, in <module>
         version=get_version(),
       File "/data/data/com.termux/files/usr/tmp/pip-build-v6O_VB/kivy/setup.py", line 47, in get_version
         ['git', 'rev-parse', 'HEAD']
       File "/data/data/com.termux/files/usr/lib/python2.7/subprocess.py", line 212, in check_output
         process = Popen(stdout=PIPE, *popenargs, **kwargs)
       File "/data/data/com.termux/files/usr/lib/python2.7/subprocess.py", line 390, in __init__
         errread, errwrite)
       File "/data/data/com.termux/files/usr/lib/python2.7/subprocess.py", line 1025, in _execute_child
         raise child_exception
     OSError: [Errno 2] No such file or directory
   
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-build-3SoY3p/kivy/


Any help will be greatly appreciated.
Thanks in advance.

Regards,
     Giovanni

ZenCODE

unread,
Apr 6, 2018, 2:35:14 PM4/6/18
to Kivy users support
YTermux is a terminal emulator and not a complete linux OS. So I doubt you are going to get Kivy working inside of termux...

But I could be wrong. I have been many times before :-) The above indicates pkg-config is missing. Try installing that into termux?

apt-get install pkg-config

Giovanni Bucci

unread,
Apr 6, 2018, 8:41:22 PM4/6/18
to Kivy users support
Hi zenCODE,
Thank You for the suggestion. I have executed the apt-get command and then the pip install kivy command. This is the error message that I receive.


Collecting kivy
  Using cached Kivy-1.10.0.tar.gz
    Complete output from command python setup.py egg_info:
    Using distutils
   
    Detected Cython version 0.25.2
    Using this graphics system: OpenGL
    WARNING: A problem occurred while running pkg-config --libs --cflags gstreamer-1.0 (code 1)
   
    Package gstreamer-1.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gstreamer-1.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gstreamer-1.0' found
   
    WARNING: A problem occurred while running pkg-config --libs --cflags sdl2 SDL2_ttf SDL2_image SDL2_mixer (code 1)
   
    Package sdl2 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `sdl2.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'sdl2' found
    Package SDL2_ttf was not found in the pkg-config search path.
    Perhaps you should add the directory containing `SDL2_ttf.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'SDL2_ttf' found
    Package SDL2_image was not found in the pkg-config search path.
    Perhaps you should add the directory containing `SDL2_image.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'SDL2_image' found
    Package SDL2_mixer was not found in the pkg-config search path.
    Perhaps you should add the directory containing `SDL2_mixer.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'SDL2_mixer' found

     
     Traceback (most recent call last):
       File "<string>", line 1, in <module>
       File "/data/data/com.termux/files/usr/tmp/pip-build-3od6kj/kivy/setup.py", line 934, in <module>
         version=get_version(),
       File "/data/data/com.termux/files/usr/tmp/pip-build-3od6kj/kivy/setup.py", line 47, in get_version

         ['git', 'rev-parse', 'HEAD']
       File "/data/data/com.termux/files/usr/lib/python2.7/subprocess.py", line 212, in check_output
         process = Popen(stdout=PIPE, *popenargs, **kwargs)
       File "/data/data/com.termux/files/usr/lib/python2.7/subprocess.py", line 390, in __init__
         errread, errwrite)
       File "/data/data/com.termux/files/usr/lib/python2.7/subprocess.py", line 1025, in _execute_child
         raise child_exception
     OSError: [Errno 2] No such file or directory
   
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /data/data/com.termux/files/usr/tmp/pip-build-urItil/kivy/


Any help will be greatly appreciated.
Thanks.

Regards,
    Giovanni

Dave McCormick

unread,
Apr 6, 2018, 10:44:42 PM4/6/18
to kivy-...@googlegroups.com
Can not run a graphic program such as Kivy in a non graphical terminal.

Use Q python if you want to work with Kivy directly on an Android device.



--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Giovanni Bucci

unread,
Apr 7, 2018, 2:21:36 AM4/7/18
to Kivy users support
Hi Dave,
Thank You for your analysis and confirmation.

Regards,
   Giovanni

Interstellar CG

unread,
Jul 31, 2020, 6:39:03 PM7/31/20
to Kivy users support
> To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.

Degenerate Tech

unread,
Aug 1, 2020, 6:51:31 AM8/1/20
to Kivy users support
use Pydroid3 IDE for Android

Degenerate Tech

unread,
Aug 1, 2020, 6:53:11 AM8/1/20
to Kivy users support
Reply all
Reply to author
Forward
0 new messages