UPDATE question:
Thanks Favoretti!
I installed jcc using apt-get and the makefile under pylucene ran a little bit and threw a java error and I dont have a clue. Here it is. Can you please let me know what error it is?
While loading org/apache/pylucene/search/PythonIntParser
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/dist-packages/jcc/__main__.py", line 98, in <module>
cpp.jcc(sys.argv)
File "/usr/lib/python2.7/dist-packages/jcc/cpp.py", line 549, in jcc
cls = findClass(className.replace('.', '/'))
File "/usr/lib/python2.7/dist-packages/jcc/cpp.py", line 73, in findClass
cls = _findClass(className)
jcc.cpp.JavaError: java.lang.UnsupportedClassVersionError: org/apache/pylucene/search/PythonIntParser : Unsupported major.minor version 51.0
Java stacktrace:
java.lang.UnsupportedClassVersionError: org/apache/pylucene/search/PythonIntParser : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
make: *** [compile] Error 255
If your python is in /usr/bin/python, i.e. system python and came from your distribution-supplied package - it probably doesn't look in /usr/local/lib/python2.7/site-packages/jcc by default.
What you can try is set PYTHONPATH environment variable to /usr/lib/python2.7:/usr/local/lib/python2.7 and try compiling like that, otherwise just move the jcc package to /usr/lib/python2.7.
This is assuming that your python installation came out of system default package and it's "home" location is /usr/lib/python2.7.
Hope this helps.