This question already has an answer here:
- How to configure Python Kivy for PyCharm on Windows? 6 answers
- Pycharm running Kivy applications 1 answer
- No module named kivy in PyCharm 2 answers
I am running Pycharm under Ubuntu and am trying to get Kivy installed in my project (virtualenv). I followed the Kivy instructions but those install it in the default environment. So, at my terminal prompt when I go into python I am able to successfully "import kivy". However, when I am in a Pycharm project with virtualenv, I get an error when I try to import from the Python console:
import kivy
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/mnt/bigdisk/apps/pycharm-2017.3.4/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 20, in do_import
module = self._system_import(name, *args, **kwargs)
ImportError: No module named kivy
I've even tried activating the virtualenv in my terminal and then performing the installation instructions. When I do this, I am told it is already installed. I think this is happening because to install kivy you have to make a sudo call (sudo apt-get install python-kivy) which is resetting the environment. I even tried sudoing to bash activating the environment and installing python-kivy, but again, it said it was installed. How do I get Kivy installed in my Pycharm virtual environment?