Undefined symbol: _ZNK.... nameB5cxx11Ev

Ivan_He: <pre><code class="lang-auto">---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
Cell In[9], line 4
      2 import time
      3 import torch
----&gt; 4 import torchaudio
      5 from transformers import pipeline
      6 from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor

File /opt/conda/lib/python3.10/site-packages/torchaudio/__init__.py:1
----&gt; 1 from . import (  # noqa: F401
      2     _extension,
      3     compliance,
      4     datasets,
      5     functional,
      6     io,
      7     kaldi_io,
      8     models,
      9     pipelines,
     10     sox_effects,
     11     transforms,
     12     utils,
     13 )
     14 from ._backend.common import AudioMetaData  # noqa
     16 try:

File /opt/conda/lib/python3.10/site-packages/torchaudio/_extension/__init__.py:45
     43 _IS_ALIGN_AVAILABLE = False
     44 if _IS_TORCHAUDIO_EXT_AVAILABLE:
---&gt; 45     _load_lib("libtorchaudio")
     47     import torchaudio.lib._torchaudio  # noqa
     49     _check_cuda_version()

File /opt/conda/lib/python3.10/site-packages/torchaudio/_extension/utils.py:64, in _load_lib(lib)
     62 if not path.exists():
     63     return False
---&gt; 64 torch.ops.load_library(path)
     65 torch.classes.load_library(path)
     66 return True

File /opt/conda/lib/python3.10/site-packages/torch/_ops.py:933, in _Ops.load_library(self, path)
    928 path = _utils_internal.resolve_library_path(path)
    929 with dl_open_guard():
    930     # Import the shared library into the process, thus running its
    931     # static (global) initialization code in order to register custom
    932     # operators with the JIT.
--&gt; 933     ctypes.CDLL(path)
    934 self.loaded_libraries.add(path)

File /opt/conda/lib/python3.10/ctypes/__init__.py:374, in CDLL.__init__(self, name, mode, handle, use_errno, use_last_error, winmode)
    371 self._FuncPtr = _FuncPtr
    373 if handle is None:
--&gt; 374     self._handle = _dlopen(self._name, mode)
    375 else:
    376     self._handle = handle

OSError: /opt/conda/lib/python3.10/site-packages/torchaudio/lib/libtorchaudio.so: undefined symbol: _ZNK5torch8autograd4Node4nameB5cxx11Ev
add Codeadd Markdown
</code></pre>
<p>I am using a kaggle environment.</p>
<p>My installation code (it has a lot of dependency conflicts but i don’t know how to solve it):<br>
!git clone <a href="https://github.com/ivanhe123/seamless_communication" class="inline-onebox" rel="noopener nofollow ugc">GitHub - ivanhe123/seamless_communication: Foundational Models for State-of-the-Art Speech and Text Translation</a><br>
!pip install ./seamless_communication</p>
<p>Dependency conflicts:<br>
ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.<br>
cudf 24.4.1 requires cubinlinker, which is not installed.<br>
cudf 24.4.1 requires cupy-cuda11x&gt;=12.0.0, which is not installed.<br>
cudf 24.4.1 requires ptxcompiler, which is not installed.<br>
cuml 24.4.0 requires cupy-cuda11x&gt;=12.0.0, which is not installed.<br>
dask-cudf 24.4.1 requires cupy-cuda11x&gt;=12.0.0, which is not installed.<br>
keras-cv 0.9.0 requires keras-core, which is not installed.<br>
keras-nlp 0.12.1 requires keras-core, which is not installed.<br>
tensorflow-decision-forests 1.8.1 requires wurlitzer, which is not installed.<br>
beatrix-jupyterlab 2023.128.151533 requires jupyterlab~=3.6.0, but you have jupyterlab 4.2.1 which is incompatible.<br>
cudf 24.4.1 requires cuda-python&lt;12.0a0,&gt;=11.7.1, but you have cuda-python 12.5.0 which is incompatible.<br>
distributed 2024.1.1 requires dask==2024.1.1, but you have dask 2024.5.2 which is incompatible.<br>
featuretools 1.31.0 requires tqdm&gt;=4.66.3, but you have tqdm 4.64.1 which is incompatible.<br>
fitter 1.7.0 requires tqdm&lt;5.0.0,&gt;=4.65.1, but you have tqdm 4.64.1 which is incompatible.<br>
gcsfs 2024.3.1 requires fsspec==2024.3.1, but you have fsspec 2024.2.0 which is incompatible.<br>
google-cloud-bigquery 2.34.4 requires packaging&lt;22.0dev,&gt;=14.3, but you have packaging 23.2 which is incompatible.<br>
jupyterlab 4.2.1 requires jupyter-lsp&gt;=2.0.0, but you have jupyter-lsp 1.5.1 which is incompatible.<br>
jupyterlab-lsp 5.1.0 requires jupyter-lsp&gt;=2.0.0, but you have jupyter-lsp 1.5.1 which is incompatible.<br>
libpysal 4.9.2 requires shapely&gt;=2.0.1, but you have shapely 1.8.5.post1 which is incompatible.<br>
momepy 0.7.0 requires shapely&gt;=2, but you have shapely 1.8.5.post1 which is incompatible.<br>
osmnx 1.9.3 requires shapely&gt;=2.0, but you have shapely 1.8.5.post1 which is incompatible.<br>
rapids-dask-dependency 24.4.1a0 requires dask==2024.1.1, but you have dask 2024.5.2 which is incompatible.<br>
rapids-dask-dependency 24.4.1a0 requires dask-expr==0.4.0, but you have dask-expr 1.1.2 which is incompatible.<br>
s3fs 2024.3.1 requires fsspec==2024.3.1, but you have fsspec 2024.2.0 which is incompatible.<br>
spopt 0.6.0 requires shapely&gt;=2.0.1, but you have shapely 1.8.5.post1 which is incompatible.<br>
tensorflow 2.15.0 requires keras&lt;2.16,&gt;=2.15.0, but you have keras 3.3.3 which is incompatible.<br>
ydata-profiling 4.6.4 requires numpy&lt;1.26,&gt;=1.16.0, but you have numpy 1.26.4 which is incompatible.</p>
<p>I think by solving the dependency conflict it will solve the problem, but i don’t know how to.</p>

ptrblck: <p>These issues are often caused by incompatible installations of PyTorch and other PyTorch-dependent libraries. In this case it seems <code>torchaudio</code> is failing so check its version and make sure it’s compatible to your installed PyTorch version.</p>

Ivan_He: <pre><code class="lang-auto">import torchaudio
import torch
print(torch.version.__version__)
print(torchaudio.version.__version__)
</code></pre>
<p>won’t work, so i used pip freeze to check the version after I installed seamless translate:</p>
<pre><code class="lang-auto">torch==2.2.2
torchaudio @ file:///tmp/torch/torchaudio-2.1.2-cp310-cp310-linux_x86_64.whl#sha256=10966b20361b49bc41b6c6ba842d3ea842320fb8c589823b4120f24a98013b4a
torchdata==0.7.1
torcheval==0.0.7
torchinfo==1.8.0
torchmetrics==1.4.0.post0
torchtext @ file:///tmp/torch/torchtext-0.16.2-cp310-cp310-linux_x86_64.whl#sha256=a2a382655a08e1f6eeab6a307d0c8d78139cfa04cc329a7dc15a3f7c1e6e7a19
torchvision @ file:///tmp/torch/torchvision-0.16.2-cp310-cp310-linux_x86_64.whl#sha256=105901a20924f652ee62df0bb57580c67725eb21f11a349658952c4be2050d94
</code></pre>