Skip to content
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

Problem installing laminar_python #11

Open
matmoro1994 opened this issue Mar 30, 2018 · 4 comments
Open

Problem installing laminar_python #11

matmoro1994 opened this issue Mar 30, 2018 · 4 comments

Comments

@matmoro1994
Copy link

Hi!
I tried to install laminar_python in my computer and I did all the steps. I install it in usr/bin and I set the PYTHONPATH. But when I try to do

import laminar_python

in Python, I have this error:

Traceback (most recent call last):
File "", line 1, in
File "laminar_python/init.py", line 3, in
from .volumetric_layering import create_levelsets, layering,
File "laminar_python/volumetric_layering.py", line 5, in
import cbstoolsjcc
File "laminar_python/cbstoolsjcc/init.py", line 2, in
import os, _cbstoolsjcc
ImportError: libjvm.so: cannot open shared object file: No such file or directory

I set also the path for the file libjvm.so but nothing changed.

Any suggestions to solve this problem?
Thank you
Matteo

@juhuntenburg
Copy link
Owner

Hi Matteo,

you might want to consider instead of laminar_python to use Nighres, which has the same and more functionalities and is being actively developed (in contrast to laminar_python). Both packages, however, are not tried and tested for Mac yet. For Nighres you might circumvent the problem using the Docker image.

That said, if you want to try and make your installation work, the reason for your error is that original code has been compiled against a Java installation that is different from yours. I can give you instructions how it can sometimes be fixed on Linux systems, but I know little about Mac, so I am not sure how that would translate:

  1. Find your libjvm.so location
    find / -type f -name libjvm.so
  2. Add it to the library path. Depending on you Java installation it will be something similar to one of these
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jvm/java-8-openjdk-amd64/lib/amd64/server/

This can be run within the current terminal for a single session, or made permanent by adding the export statement to your terminal execution script (i.e., .bashrc on most linux systems).

  1. If that doesn't do the trick you can try running::
    sudo R CMD javareconf

Hope this helps, let me know!
Julia

@matmoro1994
Copy link
Author

matmoro1994 commented Apr 11, 2018 via email

@matmoro1994
Copy link
Author

matmoro1994 commented Apr 16, 2018 via email

@juhuntenburg
Copy link
Owner

Hi Matteo,

sorry for the late reply, could you post this on the Nighres issue tracker?

Thanks!
Julia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants