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

OSError: Could not load shared object file: libllvmlite.so #4

Open
pianpwk opened this issue Sep 16, 2020 · 8 comments
Open

OSError: Could not load shared object file: libllvmlite.so #4

pianpwk opened this issue Sep 16, 2020 · 8 comments

Comments

@pianpwk
Copy link

pianpwk commented Sep 16, 2020

Hi, I've run into an issue while running the command:
python run.py --exp-config vlnce_baselines/config/paper_configs/seq2seq.yaml --run-type train

The error log is as below:

Traceback (most recent call last): File "run.py", line 10, in <module> import habitat File "/home/pp456/habitat-lab/habitat/__init__.py", line 8, in <module> from habitat.core.agent import Agent File "/home/pp456/habitat-lab/habitat/core/agent.py", line 13, in <module> from habitat.core.simulator import Observations File "/home/pp456/habitat-lab/habitat/core/simulator.py", line 16, in <module> from habitat.core.dataset import Episode File "/home/pp456/habitat-lab/habitat/core/dataset.py", line 31, in <module> from habitat.core.utils import not_none_validator File "/home/pp456/habitat-lab/habitat/core/utils.py", line 11, in <module> import quaternion File "/home/pp456/anaconda3/envs/vlnce2/lib/python3.6/site-packages/quaternion/__init__.py", line 28, in <module> from .quaternion_time_series import slerp, squad, integrate_angular_velocity, minimal_rotation, angular_velocity File "/home/pp456/anaconda3/envs/vlnce2/lib/python3.6/site-packages/quaternion/quaternion_time_series.py", line 8, in <module> from quaternion.numba_wrapper import njit File "/home/pp456/anaconda3/envs/vlnce2/lib/python3.6/site-packages/quaternion/numba_wrapper.py", line 11, in <module> from numba import njit, jit, vectorize, int64, float64, complex128 File "/home/pp456/anaconda3/envs/vlnce2/lib/python3.6/site-packages/numba/__init__.py", line 14, in <module> from numba.core import config File "/home/pp456/anaconda3/envs/vlnce2/lib/python3.6/site-packages/numba/core/config.py", line 16, in <module> import llvmlite.binding as ll File "/home/pp456/anaconda3/envs/vlnce2/lib/python3.6/site-packages/llvmlite/binding/__init__.py", line 4, in <module> from .dylib import * File "/home/pp456/anaconda3/envs/vlnce2/lib/python3.6/site-packages/llvmlite/binding/dylib.py", line 3, in <module> from llvmlite.binding import ffi File "/home/pp456/anaconda3/envs/vlnce2/lib/python3.6/site-packages/llvmlite/binding/ffi.py", line 153, in <module> raise OSError("Could not load shared object file: {}".format(_lib_name)) OSError: Could not load shared object file: libllvmlite.so

The error seems to be a conflict between pytorch (1.6.0) and quaternion (2020.9.5.14.42.2)/numba (0.51.2): running the code import torch; import numba (or quaternion) or leads to the error, while import numba (or quaternion) is fine.

Installation was done according to the "Habitat and Other Dependencies" section: installed habitat-sim with conda, and habitat-lab from branch v0.1.5 according to the given steps. The habitat versions are habitat: 0.1.5 and habitat-sim: 0.1.5

I was wondering if you might know how to resolve this issue? Thank you so much!

@pianpwk
Copy link
Author

pianpwk commented Sep 16, 2020

Very strangely I'm able to resolve this by adding import habitat before everything else:

import habitat; import torch; import quaternion

now runs completely fine.

@alloldman
Copy link

I meet this problem before. I find it is because the 'libstdc++.so.6‘ do not have correct version of GLIBCXX_3.4.22 .you can set a breakpoint at the /home/pp456/anaconda3/envs/vlnce2/lib/python3.6/site-packages/llvmlite/binding/ffi.py around 153 lines to see the final reason of the error.
I redirect the /usr/lib/x86_64-linux-gnu/libstdc++.so.6 to a libstdc++.so.6.0.26 (find in my conda lib dir), now it works fine.

@shurjobanerjee
Copy link

lhelontra/tensorflow-on-arm#13 (comment)

Following these instructions worked for me

@mukulkhanna
Copy link

I meet this problem before. I find it is because the 'libstdc++.so.6‘ do not have correct version of GLIBCXX_3.4.22 .you can set a breakpoint at the /home/pp456/anaconda3/envs/vlnce2/lib/python3.6/site-packages/llvmlite/binding/ffi.py around 153 lines to see the final reason of the error.
I redirect the /usr/lib/x86_64-linux-gnu/libstdc++.so.6 to a libstdc++.so.6.0.26 (find in my conda lib dir), now it works fine.

@alloldman Could you please elaborate on how you did the redirection you mentioned? Thanks!

@yifan123
Copy link

yifan123 commented Jun 5, 2021

I'm also able to resolve this by adding import numba; import torch; import habitat; in the first line in run.py
You may need to rearrange the three " import numba; import torch; import habitat; " to solve this problem

@mukulkhanna
Copy link

Thanks @yifan123, but this wouldn't be sustainable -- in that I'll have to make this change in every habitat project file I encounter in the future.

@yifan123
Copy link

yifan123 commented Jun 22, 2021

Thanks @yifan123, but this wouldn't be sustainable -- in that I'll have to make this change in every habitat project file I encounter in the future.

I'm also able to resolve this by
pip install numba==0.49.1 --ignore-installed llvmlite

@xuangch
Copy link

xuangch commented Feb 20, 2022

I meet this problem before. I find it is because the 'libstdc++.so.6‘ do not have correct version of GLIBCXX_3.4.22 .you can set a breakpoint at the /home/pp456/anaconda3/envs/vlnce2/lib/python3.6/site-packages/llvmlite/binding/ffi.py around 153 lines to see the final reason of the error. I redirect the /usr/lib/x86_64-linux-gnu/libstdc++.so.6 to a libstdc++.so.6.0.26 (find in my conda lib dir), now it works fine.

Could you please elaborate on how you did the redirection you mentioned? Thanks!

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

6 participants