I have a prototype written in Python that I need to port into Java to put into production. Python 2.7.10 has been installed using miniconda
. The prototype uses a 3rd party library nltk
that I installed using pip
.
To void rewriting the code from scratch, at least initially, I want to first try call the prototype code directly from Java using jython
.
When I try executing a command like
java -jar jython-standalone-2.7.0.jar myPrototype.py
I get
Traceback (most recent call last):
File "myPrototype.py", line 4, in <module>
from nltk import AlignedSent
ImportError: No module named nltk
It works fine when I run python myPrototype.py
.
Is there a way of configuring my jython
install so that it can find all 3rd party packages that I've added to my python
install? I realize that some of those might not run in jython
but at least I want to have access to those that do.