I am using jep for running python script in java, I basically need to run the script that uses scikit package. But it shows me error when I try to run, which I couldn't understand.
This is the piece of code in my program, Jep jep = new Jep(); jep.eval("import sklearn");
It shows the below error,but sklearn works perfectly well in python. Jul 06, 2016 5:31:50 PM JepEx main SEVERE: null jep.JepException: jep.JepException: : /usr/local/lib/python2.7/dist-packages/sklearn/__check_build/_check_build.so: undefined symbol: _PyThreadState_Current
Contents of /usr/local/lib/python2.7/dist-packages/sklearn/check_build: setup.py __init.pyc _check_build.so build init.py setup.pyc
It seems that scikit-learn has not been built correctly.
If you have installed scikit-learn from source, please do not forget
to build the package before using it: run python setup.py install
or
make
in the source directory.
If you have used an installer, please check that it is suited for your Python version, your operating system and your platform. at jep.Jep.eval(Jep.java:485) at JepEx.executeCommand(JepEx.java:26) at JepEx.main(JepEx.java:38) Caused by: jep.JepException: : /usr/local/lib/python2.7/dist-packages/sklearn/__check_build/_check_build.so: undefined symbol: _PyThreadState_Current
Contents of /usr/local/lib/python2.7/dist-packages/sklearn/check_build: setup.py __init.pyc _check_build.so build init.py setup.pyc
It seems that scikit-learn has not been built correctly.
If you have installed scikit-learn from source, please do not forget
to build the package before using it: run python setup.py install
or
make
in the source directory.
If you have used an installer, please check that it is suited for your Python version, your operating system and your platform. at /usr/local/lib/python2.7/dist-packages/sklearn/check_build/__init.raise_build_error(init.py:41) at /usr/local/lib/python2.7/dist-packages/sklearn/check_build/__init.(init.py:46) at /usr/local/lib/python2.7/dist-packages/sklearn/init.(init.py:56)