Problems working with kivy in Python 2.7

1

I have Python 2.7 and I have installed kivy.

It has to be installed correctly because when I import it from the Python console it does not give me an error. But if I keep entering code I have problems. I am new to this and I do not know what is the workflow with Python and kivy.

I hit you what the console throws me in case you can lend me a hand. It's the following:

Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from kivy.app import App
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Attempted relative import in non-package
>>> import kivy
[INFO              ] [Logger      ] Record log in C:\Users\User\.kivy\logs\kivy_16-03-01_2.txt
[INFO              ] [Kivy        ] v1.9.1
[INFO              ] [Python      ] v2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)]
>>> from kivy.app import App
[INFO              ] [Factory     ] 179 symbols loaded
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "C:\Python27\lib\site-packages\kivy\app.py", line 327, in <module>
     from kivy.uix.widget import Widget
   File "C:\Python27\lib\site-packages\kivy\uix\widget.py", line 219, in <module>
     from kivy.graphics import (
   File "C:\Python27\lib\site-packages\kivy\graphics\__init__.py", line 89, in <module>
     from kivy.graphics.instructions import Callback, Canvas, CanvasBase, \
 ImportError: DLL load failed: No se puede encontrar el m
    
asked by Carmen Torralvo 08.03.2016 в 14:04
source

1 answer

1

What I could find according to the documentation is that for the installation in Windows you have to follow the steps described:

  • Make sure you have the latest versions of pip and wheel :

    $ python -m pip install --upgrade pip wheel setuptools
    
  • Install the dependencies (you can ignore gstreamer (~ 90MB) if you do not need it, see the dependencies of Kivy):

    $ python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew kivy.deps.gstreamer --extra-index-url https://kivy.org/downloads/packages/simple/
    
  • Install kivy :

    $ python -m pip install kivy
    
  • To this I would also add (if you do not have it installed) the library Pillow (a fork of PIL ):

    $ pip install pillow
    

    Try to uninstall kivy and perform the steps I just described.

    References

    answered by 08.03.2016 в 15:02