VLN-CE icon indicating copy to clipboard operation
VLN-CE copied to clipboard

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

Open pianpwk opened this issue 5 years ago • 8 comments

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 avatar Sep 16 '20 09:09 pianpwk

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.

pianpwk avatar Sep 16 '20 10:09 pianpwk

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 avatar Dec 11 '20 12:12 alloldman

https://github.com/lhelontra/tensorflow-on-arm/issues/13#issuecomment-418202182

Following these instructions worked for me

shurjobanerjee avatar Apr 03 '21 10:04 shurjobanerjee

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!

mukulkhanna avatar Jun 04 '21 14:06 mukulkhanna

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

yifan123 avatar Jun 05 '21 18:06 yifan123

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.

mukulkhanna avatar Jun 06 '21 07:06 mukulkhanna

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

yifan123 avatar Jun 22 '21 13:06 yifan123

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!

xuangch avatar Feb 20 '22 02:02 xuangch