Closed aaelony-catasys closed 3 years ago
I wonder if perhaps the jvm and the python systems were compiled with different versions of glibc. Can conda install java?
I think conda could install java (e.g. https://anaconda.org/bioconda/java-jdk), would that matter? What is weird to me is that the python shell seems to find everything it needs. Could it be that linux needs a special way to determine the paths similar to what windows does in libpython-clj2.python.windows
?
Did you set LD_LIBRARY_PATH? When you run the Conda python from the command line a lot of stuff is compiled into the executable -- it doesn't actually load the shared library:
https://github.com/conda/conda/issues/9500#issuecomment-565753807
conda compiles a fat executable with a lot of those things compiled in. Aside from that; the libcXX shared library needs to be in LD_LIBRARY_PATH -- for the java executable to work.
When you compile things on some operating systems you have a chance to set the shared library lookup pathways into the executable itself so analyzing the python executable itself may very well yield some insight as to why it can find libc++ and the java executable cannot.
I can try that. What is the preferred way to set LD_LIBRARY_PATH (can it be done from cider/emacs?)
That depends on your shell scripting environment. It is an environment variable that has to be set before the jvm executable is started.
Thank-you!! You fixed it :)
export LD_LIBRARY_PATH="/home/aaelony/.conda/envs/py-nlp/x86_64-conda_cos6-linux-gnu/:/home/aaelony/.conda/envs/py-nlp/lib/:$LD_LIBRARY_PATH"
Exporting LD_LIBRARY_PATH as above prior to running the CIDER session fixes this issue.
I'll try not to forget this next time, but maybe this could happen behind the scenes or hint message somehow?
thanks again!!
That is awesome!!
For future reference, here is a way to set that variable that I think is a bit more robust:
export LD_LIBRARY_PATH="$(python3-config --prefix)/lib"
Able to run Zeroshot classification example using conda env in python but not in libpython-clj. Curious why isn't finding paths needed that it would find in ipython proper.
"ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found"
This is using Linux: