0

I have Ubuntu 16.04.4. I installed Kivy from Kivy Official Site. I followed all the steps correctly. In spite of doing all this, when I try to import kivy in python, it is giving this error: ModuleNotFoundError: No module named 'kivy' I'm getting this error in both the terminal and Anaconda. How can I fix this?

  1. which python /home/username/anaconda3/bin/python

  2. echo $PYTHONPATH This gave no output.

  3. dpkg -L python-kivy | grep kivy/__init__

/usr/lib/python2.7/dist-packages/kivy/init.py

  • Did,you ask on the kivy mailing list / forums as this is outside the Ubuntu repositories? – Panther May 26 '18 at 19:16
  • @SebastianStark Check it out. I have edited the question. – Arvind Ramadurai May 27 '18 at 5:48
2

Short answer: Don't use anaconda if you don't know what you're doing.

Long answer: you are using a python installation (anaconda) which exists alongside the system python installation. If you install a system python package, or, in the case of kivy, a package that is made for the system python, it is probably not seen by anaconda.

In order to use it you have to either install the package the way anaconda wants it (beyond the scope of this site), or you have to start the system python interpreter, which is /usr/bin/python.

On the Kivy homepage you find instructions on how to install using virtual environments (https://kivy.org/docs/installation/installation-linux.html#installation-in-a-virtual-environment), I recommend this method if you are not using the standard system python installation.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.