java.lang.UnsatisfiedLinkError: no jep in java.library.path - OSX - DYLD_LIBRARY_PATH doesn't help

1,176 views
Skip to first unread message

Alejandro Kapit

unread,
May 15, 2018, 9:13:33 AM5/15/18
to Jep Project
Hi all,
I'm trying to run my jar by passing -DDYLD_LIBRARY_PATH=[path...]  and it doesn't work.
If I set it as a linux env var also doesn't work...

Only (and I don't know why) by running it from intelliJ with DYLD_LIBRARY_PATH within the env vars it works.... but i -need- to run the jar from my virtualenv, and In intelliJ I think I cannot...

Any idea?

Thanks

Nathan Jensen

unread,
May 15, 2018, 12:21:21 PM5/15/18
to Jep Project
The -D won't work as that's a Java parameter and DYLD_LIBRARY_PATH needs to be an environment variable.  But you also tried it as an environment variable.

What version of OS X are you using?  There's a lengthy discussion of OS X compatibility here: https://github.com/ninia/jep/issues/113  Long story short: You might try the dev_3.8 branch and set the environment PYTHONHOME with your virtualenv and see if that fixes it for you.

I have no idea why IntelliJ would make a difference.

--
You received this message because you are subscribed to the Google Groups "Jep Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jep-project+unsubscribe@googlegroups.com.
To post to this group, send email to jep-p...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jep-project/73e5c7dd-945a-4c1a-9cca-8b36aad4e779%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alejandro Kapit

unread,
May 15, 2018, 3:45:35 PM5/15/18
to Jep Project
It's OSX High sierra 10.13.4

You're right, I tried exporting the env var on my console but it didn't work, however running the Jar from intellij (which has a config dialog for setting its env vars) worked, pretty weird.


On Tuesday, May 15, 2018 at 7:21:21 PM UTC+3, Nathan Jensen wrote:
The -D won't work as that's a Java parameter and DYLD_LIBRARY_PATH needs to be an environment variable.  But you also tried it as an environment variable.

What version of OS X are you using?  There's a lengthy discussion of OS X compatibility here: https://github.com/ninia/jep/issues/113  Long story short: You might try the dev_3.8 branch and set the environment PYTHONHOME with your virtualenv and see if that fixes it for you.

I have no idea why IntelliJ would make a difference.
On Tue, May 15, 2018 at 8:13 AM, Alejandro Kapit <aka...@gmail.com> wrote:
Hi all,
I'm trying to run my jar by passing -DDYLD_LIBRARY_PATH=[path...]  and it doesn't work.
If I set it as a linux env var also doesn't work...

Only (and I don't know why) by running it from intelliJ with DYLD_LIBRARY_PATH within the env vars it works.... but i -need- to run the jar from my virtualenv, and In intelliJ I think I cannot...

Any idea?

Thanks

--
You received this message because you are subscribed to the Google Groups "Jep Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jep-project...@googlegroups.com.

Alejandro Kapit

unread,
May 16, 2018, 9:36:25 AM5/16/18
to Jep Project
Now i'm trying this on linux.
I'm setting LD_LIBRARY_PATH like this:

export LD_LIBRARY_PATH=/home/outflink/GIT/outflink_v2/outflink/lib/python3.6/site-packages

but now i'm getting this error:

java.lang.NoClassDefFoundError: Could not initialize class jep.Jep

And i've installed jep using virtualenv (through pip install jep).

Any hint?


Alejandro Kapit

unread,
May 16, 2018, 9:54:31 AM5/16/18
to Jep Project
I actually added "/jep" at the end of the path and it seems to be working.
Is that the right way?

So the issue is solved in linux, however in OSX it's still there, I might try using the dev branch..

Nathan Jensen

unread,
May 16, 2018, 4:09:47 PM5/16/18
to Jep Project
You got the NoClassDefFoundError because the static block on the Jep class was failling.  https://github.com/ninia/jep/blob/dev_3.7/src/jep/Jep.java#L217  If static blocks fail to initialize a class then it comes out ugly as a NoClassDefFoundError.  Yes, your setting LD_LIBRARY_PATH to the jep directory is correct.

If you ran python setup.py install then it should have created a jep script in your python/bin directory.  That works with virtualenv, so you might check that out to see what environment variables that is using.

To unsubscribe from this group and stop receiving emails from it, send an email to jep-project+unsubscribe@googlegroups.com.

To post to this group, send email to jep-p...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages