简体   繁体   English

ImportError:libpython3.7m.so.1.0:无法打开共享 object 文件:没有这样的文件或目录

[英]ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory

I am having trouble running a python script on a computing cluster and I apologize ahead of time if this is a naive mistake.我在计算集群上运行 python 脚本时遇到问题,如果这是一个天真的错误,我提前道歉。 I'm not sure if the problem originates from me configuring my own conda virtual environment incorrectly but the problem nonetheless is reproduced when I run:我不确定问题是否源于我错误地配置了我自己的 conda 虚拟环境,但是当我运行时问题仍然存在:

srun -p use-everything --pty python test.py

I get the error我得到错误

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    from acme.agents.tf import dqn
  File "/om2/user/armas/anaconda/envs/dist_rl/lib/python3.7/site-packages/acme/agents/tf/dqn/__init__.py", line 18, in <module>
    from acme.agents.tf.dqn.agent import DQN
  File "/om2/user/armas/anaconda/envs/dist_rl/lib/python3.7/site-packages/acme/agents/tf/dqn/agent.py", line 20, in <module>
    from acme import datasets
  File "/om2/user/armas/anaconda/envs/dist_rl/lib/python3.7/site-packages/acme/datasets/__init__.py", line 17, in <module>
    from acme.datasets.reverb import make_reverb_dataset
  File "/om2/user/armas/anaconda/envs/dist_rl/lib/python3.7/site-packages/acme/datasets/reverb.py", line 22, in <module>
    from acme.adders import reverb as adders
  File "/om2/user/armas/anaconda/envs/dist_rl/lib/python3.7/site-packages/acme/adders/reverb/__init__.py", line 21, in <module>
    from acme.adders.reverb.base import DEFAULT_PRIORITY_TABLE
  File "/om2/user/armas/anaconda/envs/dist_rl/lib/python3.7/site-packages/acme/adders/reverb/base.py", line 26, in <module>
    import reverb
  File "/om2/user/armas/anaconda/envs/dist_rl/lib/python3.7/site-packages/reverb/__init__.py", line 27, in <module>
    from reverb import item_selectors as selectors
  File "/om2/user/armas/anaconda/envs/dist_rl/lib/python3.7/site-packages/reverb/item_selectors.py", line 19, in <module>
    from reverb import pybind
  File "/om2/user/armas/anaconda/envs/dist_rl/lib/python3.7/site-packages/reverb/pybind.py", line 1, in <module>
    import tensorflow as _tf; from .libpybind import *; del _tf
ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
srun: error: node014: task 0: Exited with exit code 1

On my local machine, I was struggling with same issue when I was running a virtual environment, I solved this problem simply with sudo apt-get install libpython3.7 .在我的本地机器上,我在运行虚拟环境时遇到了同样的问题,我简单地用sudo apt-get install libpython3.7解决了这个问题。

Here's some other things that may be helpful to know.这里有一些其他的可能对了解有帮助的事情。

$which libpython
/usr/bin/which: no libpython in (/om2/user/armas/anaconda/envs/dist_rl/bin:/om2/user/armas/anaconda/bin:/om2/user/armas/anaconda/condabin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
$echo $PATH
/om2/user/armas/anaconda/envs/dist_rl/bin:/om2/user/armas/anaconda/bin:/om2/user/armas/anaconda/condabin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
$echo $LD_LIBRARY_PATH
/om2/user/armas/anaconda/bin/

When I change my LD_LIBRARY_PATH , ie export LD_LIBRARY_PATH=/om2/user/armas/anaconda/lib:$LD_LIBRARY_PATH and run the script, my anaconda thinks I do not have jax installed.当我更改我的LD_LIBRARY_PATH ,即export LD_LIBRARY_PATH=/om2/user/armas/anaconda/lib:$LD_LIBRARY_PATH并运行脚本时,我的 anaconda 认为我没有安装 jax。 I ran pip install dm-acme[jax] and now when I run the script, it was saying I don't have a module named atari_py.我运行了 pip install dm-acme[jax] 现在当我运行脚本时,它说我没有名为 atari_py 的模块。 I think it is leading me down a chain of dependencies.我认为它使我陷入了一系列依赖关系。

I had installed acme using this link , but using a conda environment.我使用此链接安装了 acme,但使用的是 conda 环境。 My system admin said it could possibly be that acme is not made for anaconda.我的系统管理员说可能不是为 anaconda 制作 acme。 Why could that be if that is the case?如果是这样,为什么会这样?

If there's anything I missed please let me know and I'll be sure to add, thank you again!如果有什么遗漏的请告诉我,我一定会补充的,再次感谢!

Try this:尝试这个:

sudo apt-get install libpython3.7

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 问:python(在集群的bash脚本中使用cutadapt):libpython3.7m.so.1.0:无法打开共享对象文件:无此类文件或目录 - Q: python (using cutadapt in bash script on cluster): libpython3.7m.so.1.0: cannot open shared object file: No such file or directory 加载共享库 libpython3.7m.so.1.0 时出错:没有这样的文件或目录(/usr/local/bin/coverage 需要) - Error loading shared library libpython3.7m.so.1.0: No such file or directory (needed by /usr/local/bin/coverage) Python3.5 导入错误:libpython3.5m.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - Python3.5 ImportError: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory ImportError: libpython3.8.so.1.0: 无法打开共享对象文件: 没有那个文件或目录 - ImportError: libpython3.8.so.1.0: cannot open shared object file: No such file or directory python:加载共享库时出错:libpython3.4m.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - python: error while loading shared libraries: libpython3.4m.so.1.0: cannot open shared object file: No such file or directory 加载共享库时出现 Python 错误:libpython3.5m.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - Python error while loading shared libraries: libpython3.5m.so.1.0: cannot open shared object file: No such file or directory Python3.7:加载共享库时出错:libpython3.7m.so.1.0 - Python3.7: error while loading shared libraries: libpython3.7m.so.1.0 Docker:libpython2.7.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - Docker: libpython2.7.so.1.0: cannot open shared object file: No such file or directory libpython2.7.so.1.0:无法打开共享对象文件:没有这样的文件或目录 - libpython2.7.so.1.0: cannot open shared object file: No such file or directory 导入错误:libbz2.so.1.0:无法打开共享 object 文件:没有这样的文件或目录 || 仅在 PYCHARM - ImportError: libbz2.so.1.0: cannot open shared object file: No such file or directory || ONLY IN PYCHARM
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM