I'm trying to execute kivy 1.9.1 examples in Ubuntu 14.
Running the examples from command line gave me the error:
ImportError: No module named _clock
Downloading kivy source code from git, and checking the installed packages in the virtualenv directories, I found the _clock.so file was missing in the venvs/kivyinstall/lib/python2.7/site-packages/kivy folder.
So, I went into the kivy_sorce/kivy folder, and create a simple setup.py to execute with cython to get de .so compiled version:
from distutils.core import setup
from Cython.Build import cythonize
setup(
name = 'clock',
ext_modules = cythonize("_clock.pyx"),
)
and
python setup.py build_ext --inplace
Then I copied the resulting .so file into my virtual environment in the expected folder venvs/kivyinstall/lib/python2.7/site-packages/kivy.
Now, examples run from command line (activating virtual environment),
python examples/demo/pictures/main.py
And it also runs properly from pycharm's python console (I previosly configured as python interpreter the python executable from my kivy-install venv) executing this:
import subprocess
subprocess.call(['python', 'examples/demo/pictures/main.py'])
Pycharm seems to find the package cause the kivy._clock import appear no more in red, but if I execute the example directly from pycharm (ctrl+shift+F10), it keeps asking for the missing kivy._clock module.
Any hint about why pycharm still can't find the module?