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

librebound.cpython-39-x86_64-linux-gnu.so import error #79

Closed
dangcpham opened this issue Jun 21, 2022 · 2 comments
Closed

librebound.cpython-39-x86_64-linux-gnu.so import error #79

dangcpham opened this issue Jun 21, 2022 · 2 comments

Comments

@dangcpham
Copy link
Contributor

dangcpham commented Jun 21, 2022

Hi, it seems like this issue comes up every few years or so (#26, #39) , so I guess it's my turn. I have a custom version of rebound and a custom version of reboundx.

After modifying the source code, I reinstalled rebound and then reboundx (using pip install -e . in their respective directories). This occured without any error. Importing rebound separately worked without any issues too. However, when I tried to import reboundx, I encountered the following error:

>>> import reboundx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/mnt/g/Documents/pwds/reboundx/reboundx/__init__.py", line 13, in <module>
    clibreboundx = cdll.LoadLibrary(pymodulespath + '/../libreboundx' + suffix)
  File "/home/dang/anaconda3/envs/planets/lib/python3.9/ctypes/__init__.py", line 460, in LoadLibrary
    return self._dlltype(name)
  File "/home/dang/anaconda3/envs/planets/lib/python3.9/ctypes/__init__.py", line 382, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: librebound.cpython-39-x86_64-linux-gnu.so: cannot open shared object file: No such file or directory

I also tried to use python setup.py install in both directories to install, but the same issue occurred. I'm not quite sure what could have went wrong and it seems like the previous issues' solutions don't apply here. Thanks for your help!

Dang

@dtamayo
Copy link
Owner

dtamayo commented Jun 21, 2022

Hi Dang, these are always a bit tricky to diagnose on someone else's computer. Could you give us a bit more detail, as done in #39 ?

@dangcpham
Copy link
Contributor Author

It seems that after I cleaned up my reboundx directory, reinstalled everything in a new virtual environment, the import issue is no longer a problem.

Here is what I did:
virtualenv -p python3 venv
source venv/bin/activate
In rebound directory: pip install -e .
In reboundx directory: pip install -e .

Thanks for your help!

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