0

我在尝试运行依赖于 DeepTCR 包(例如 Tensorflow)的 python 代码时收到以下错误。我在(guix)shell(包括 python 3.8.2 和 DeepTCR 所需的所有包)中运行我的脚本。所有已安装的软件包都可以在https://github.com/sidhomj/DeepTCR/blob/master/requirements.txt找到。我首先(在安装 python3.8.2 并进入 shell 之后)运行,pip3 install --user DeepTCR然后运行pip3 install --user -r requirements.txt​​.

这是错误:

Traceback (most recent call last):


File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File DeepTCR_V1.py, line 3, in <module>
    from DeepTCR.DeepTCR import DeepTCR_U
  File "/home/user/.local/lib/python3.8/site-packages/DeepTCR/DeepTCR.py", line 3, in <module>
    from DeepTCR.functions.Layers import *
  File "/home/user/.local/lib/python3.8/site-packages/DeepTCR/functions/Layers.py", line 1, in <module>
    import tensorflow as tf
  File "/home/user/.local/lib/python3.8/site-packages/tensorflow/__init__.py", line 41, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/__init__.py", line 40, in <module>
    from tensorflow.python.eager import context
  File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/eager/context.py", line 35, in <module>
    from tensorflow.python import pywrap_tfe
  File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tfe.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py", line 83, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/user/.local/lib/python3.8/site-packages/tensorflow/python/pywrap_tensorflow.py", line 64, in <module>
    from tensorflow.python._pywrap_tensorflow_internal import *
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

我试图运行的 Python 脚本是:

import sys
sys.path.append('../')
from DeepTCR.DeepTCR import DeepTCR_U
from DeepTCR.DeepTCR import DeepTCR_SS

# Instantiate training object
DTCR_SS = DeepTCR_SS('Tutorial')

进入 shell 后,我python3 /"path"/DeepTCR_V1.py开始运行 python 脚本。我知道这不是一个“工作”脚本,但由于我不断收到错误消息,我开始将脚本缩短到这一点。

我尝试重新安装 tensorflow 并更改我的 LD_LIBRARY_PATH (仅针对一个会话,没有持久性)。

预先感谢您的帮助。

4

0 回答 0