Reputation: 828
I'm trying to install kivyMD, which is a kivy material theme, on my ubuntu computer. https://gitlab.com/kivymd/KivyMD
I have installed kivy, and the example from kivy website run fine.
I have installed kivyMD with these command from their gitlab:
pip install kivy-garden
garden install recycleview
When I try to run the example kitchen_sink.py
, I get an error.
Here is the output:
Traceback (most recent call last):
File "/home/max/Documents/KivyMD/kitchen_sink.py", line 2, in <module>
import kivymd.snackbar as Snackbar
File "/home/max/Documents/KivyMD/kivymd/snackbar.py", line 50, in <module>
''')
File "/usr/lib/python2.7/dist-packages/kivy/lang.py", line 1491, in load_string
parser = Parser(content=string, filename=fn)
File "/usr/lib/python2.7/dist-packages/kivy/lang.py", line 1049, in __init__
self.parse(content)
File "/usr/lib/python2.7/dist-packages/kivy/lang.py", line 1119, in parse
self.execute_directives()
File "/usr/lib/python2.7/dist-packages/kivy/lang.py", line 1083, in execute_directives
mod = __import__(package)
File "/home/max/Documents/KivyMD/kivymd/button.py", line 28, in <module>
from kivymd.theming import ThemableBehavior
File "/home/max/Documents/KivyMD/kivymd/theming.py", line 20, in <module>
class ThemeManager(Widget):
File "/home/max/Documents/KivyMD/kivymd/theming.py", line 52, in ThemeManager
bind=('primary_palette', 'primary_hue'))
File "kivy/properties.pyx", line 1176, in kivy.properties.AliasProperty.__init__ (kivy/properties.c:19156)
TypeError: __init__() takes exactly 2 positional arguments (1 given)
[Finished in 0.5s with exit code 1]
Any idea ?
Upvotes: 0
Views: 2033
Reputation: 167
Try to use:
pip3 install kivymd
It works fine for me, and you need to install kivyMD in the Python3 directory, kivy only works with python=>3.5
Upvotes: 2
Reputation: 828
I found it.
I forgot to add the ppa before installing kivy.
sudo add-apt-repository ppa:kivy-team/kivy
Upvotes: 1