-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception in thread "main" jep.JepException: <class 'ModuleNotFoundError'>: No module named 'jep' #513
Comments
That is unusual and I am not certain what would cause that. I recommend checking to make sure that jep is installed into the virtual environment and that the virtual environment is activated before the java application is started. |
How to activate the virtual environment? i have load the jep.dll into the path and with function MainInterpreter.setJepLibraryPath(), what else can i do? |
Hey, for activation you source /bin/activate - probably before you start your java process. By default virtualenv does not put the python installation's site-packages onto the path. So if you start your plain python in virtualenv, jep will also not be found (try to 'import jep'). Alternatively you should be able to extend the python path manually with JepConfig.addIncludePaths and SharedInterpreter.setConfig(JepConfig). Note thtat this is additional to your already mentioned MainInterpreter.setJepLibraryPath. One is for finding python modules in python, the other for finding the jep C-library in java. I think, if you try --system-site-packages, both are not needed. |
It does help, thank you very much! |
I am having this issue as well. I've tried installing
I tried running this as the very first thing in my application, and is still getting the error:
I would like to note that the error message is suspiciously similar to a regular bad module import message from python. I am using jep v4.2.0 |
@sillydan1 Do you have multiple python installation on your system. That can occur if java is loading libpython from one python installation while jep is installed in a different python installation.
It is a regular import error message, it has just been converted to a java exception. You should be able to troubleshoot this like any other module install error and make sure that the jep python library is installed correctly in your python. |
I want to use a Python library downloaded as a git submodule on my Java project, but first I want to test that I have installed properly jep to my project, so I tried to run a simple program:
When I executed the code the following error occured:
Exception in thread "main" jep.JepException: <class 'ModuleNotFoundError'>: No module named 'jep'
Do you know how can I overcome this problem?
Environment (please complete the following information):
pip install jep
)The text was updated successfully, but these errors were encountered: