Closed st4rfall closed 3 years ago
change src code and rebuild to load the library https://github.com/ninia/jep/blob/8a2746a2ff67d219d76733f05d526e4c65e9a177/src/main/c/Jep/pyembed.c#L375
void* dlresult = dlopen("/root/python379tgz/Python-3.7.9-compile-enableshared/lib/libpython3.7m.so.1.0", RTLD_LAZY | RTLD_NOLOAD | RTLD_GLOBAL);
and load the library in my java app too
System.load("/root/python379tgz/Python-3.7.9-compile-enableshared/lib/libpython3.7m.so.1.0");
problem solved. very inelegant way
Was the directory containing libpython in your LD_LIBRARY_PATH environment variable?
Describe the problem I have to use Java to drive my tensorflow parogram but meet error when trying to import fcntl. So I make a demo and package it a jar file(jep is packaged too). After executing java -jar I get this error:
here is the code
Environment (please complete the following information):
Logs Please attach the complete console output of the build.
Additional context I compiled my python the folloing steps
and my python works fine importing fcntl:
any ideas?