ImportError: libc10.so: cannot open shared object file: No such file or directory

Question:

While running smdataparallel, I see following error

# python
Python 3.6.10 |Anaconda, Inc.| (default, May  8 2020, 02:54:21)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import smdistributed.dataparallel.torch.distributed as dist
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/conda/lib/python3.6/site-packages/smdistributed/dataparallel/__init__.py", line 16, in <module>
    import smddpcommon as hc
ImportError: libc10.so: cannot open shared object file: No such file or directory
Asked By: Chaitanya Bapat

||

Answers:

libc10.so is made available by pytorch. Hence first

import torch

and then import packages that depend on pytorch.

Answered By: Chaitanya Bapat

You can use find to locate this file. For example, find YOUR_HOME_PATH -name "*libc10.so*". For example, I found /MY_HOME_PATH/anaconda3/envs/xrnerf/lib/python3.7/site-packages/torch/lib/libc10.so in mine.

Answered By: Moonlight Knight
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.