Having the Error "ImportError: No module named setupconfig" with kivy
Question: Trying to run the script in the question: [Kivy Text Input for Arabic
Text](https://stackoverflow.com/questions/30514853/kivy-text-input-for-arabic-
text).

    
    
    from kivy.app import App
    from kivy.uix.floatlayout import FloatLayout
    from kivy.uix.textinput import TextInput
    
    
    class EditorApp(App):
        def build(self):
            f = FloatLayout()
            textinput = TextInput(text='Hello world', font_name='DroidKufi-Regular.ttf')
            # import pdb; pdb.set_trace()
    
            f.add_widget(textinput)
    
            return f
    
    
    if __name__ == '__main__':
        EditorApp().run()
    

I have Ubuntu 14.04 and I have installed `Cython` with `apt-get` and `kivy`
with `pip` but still having this error:

    
    
    [INFO   ] [Logger      ] Record log in /home/assem/.kivy/logs/kivy_15-05-28_2.txt
    [INFO   ] [Kivy        ] v1.9.0
    [INFO   ] [Python      ] v2.7.6 (default, Mar 22 2014, 22:59:38) 
    [GCC 4.8.2]
    [INFO   ] [Factory     ] 173 symbols loaded
     Traceback (most recent call last):
       File "kivy.test.py", line 1, in <module>
         from kivy.app import App
       File "/usr/local/lib/python2.7/dist-packages/Kivy-1.9.0-py2.7-linux-i686.egg/kivy/app.py", line 324, in <module>
         from kivy.uix.widget import Widget
       File "/usr/local/lib/python2.7/dist-packages/Kivy-1.9.0-py2.7-linux-i686.egg/kivy/uix/widget.py", line 167, in <module>
         from kivy.graphics.transformation import Matrix
       File "/usr/local/lib/python2.7/dist-packages/Kivy-1.9.0-py2.7-linux-i686.egg/kivy/graphics/__init__.py", line 89, in <module>
         from kivy.graphics.instructions import Callback, Canvas, CanvasBase, \
       File "vbo.pxd", line 7, in init kivy.graphics.instructions (/tmp/easy_install-0Cj46_/Kivy-1.9.0/kivy/graphics/instructions.c:13615)
       File "compiler.pxd", line 1, in init kivy.graphics.vbo (/tmp/easy_install-0Cj46_/Kivy-1.9.0/kivy/graphics/vbo.c:5217)
       File "shader.pxd", line 5, in init kivy.graphics.compiler (/tmp/easy_install-0Cj46_/Kivy-1.9.0/kivy/graphics/compiler.c:2970)
       File "texture.pxd", line 3, in init kivy.graphics.shader (/tmp/easy_install-0Cj46_/Kivy-1.9.0/kivy/graphics/shader.c:9955)
       File "context_instructions.pxd", line 1, in init kivy.graphics.texture (/tmp/easy_install-0Cj46_/Kivy-1.9.0/kivy/graphics/texture.c:28975)
       File "context_instructions.pyx", line 29, in init kivy.graphics.context_instructions (/tmp/easy_install-0Cj46_/Kivy-1.9.0/kivy/graphics/context_instructions.c:16774)
       File "/usr/local/lib/python2.7/dist-packages/Kivy-1.9.0-py2.7-linux-i686.egg/kivy/core/image/__init__.py", line 52, in <module>
         from kivy.setupconfig import USE_SDL2
     ImportError: No module named setupconfig
    

How could I fix that?


Answer: I found an issue submitted to `kivy` about ["Setupconfig.py not installed with
pip"](https://github.com/kivy/kivy/issues/2850), they seems fixed and closed
it.

However, I fixed the error by re-installing `kivy` via `apt-get` instead of
`pip`. I followed the installation steps from [official
webpage](http://kivy.org/docs/installation/installation-linux.html):

    
    
    $ sudo add-apt-repository ppa:kivy-team/kivy
    $ sudo apt-get install python-kivy
    

