I'm working on a quick interface to allow the use of the 9 DOF IMU in the rpi sense hat from java and I can't seem to get the python to work out. I have added the python 2.7 libraries into the sys path of the Jython environment but it still can't find this 'type_check' module.
Here is the java code:
PythonInterpreter interpreter;
SenseHat()
{
interpreter = new PythonInterpreter();
interpreter.exec("import sys");
interpreter.exec("sys.path.append('/usr/lib/python2.7/dist-packages')");
interpreter.exec("from sense_hat import SenseHat");
interpreter.exec("sense = SenseHat()");
PyObject result = interpreter.eval("sense.get_temperature()");
System.out.println(result.toString());
interpreter.close();
}
which attempts to use the RPI sense hat python API. When executed I get this error:
Exception in thread "main" Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python2.7/dist-packages/sense_hat/__init__.py", line 2, in <module>
from .sense_hat import SenseHat, SenseHat as AstroPi
File "/usr/lib/python2.7/dist-packages/sense_hat/sense_hat.py", line 7, in <module>
import numpy as np
File "/usr/lib/python2.7/dist-packages/numpy/__init__.py", line 153, in <module>
from . import add_newdocs
File "/usr/lib/python2.7/dist-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/usr/lib/python2.7/dist-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
ImportError: No module named type_check