sagemaker-pytorch-training-toolkit
sagemaker-pytorch-training-toolkit copied to clipboard
Error importing torchaudio
I'm trying to install torchaudio inside the PyTorch container and run into this error. Looking at online forums indicate that multiple torch versions or CUDA issues lead to this error. I tried installing a version that is compatible with the existing torch version (1.6.0) in the container, but it failed with the same error.
Traceback (most recent call last):
File "train_model.py", line 32, in <module>
import torchaudio
File "/opt/conda/lib/python3.6/site-packages/torchaudio/__init__.py", line 1, in <module>
from . import extension
File "/opt/conda/lib/python3.6/site-packages/torchaudio/extension/__init__.py", line 5, in <module>
_init_extension()
File "/opt/conda/lib/python3.6/site-packages/torchaudio/extension/extension.py", line 12, in _init_extension
_init_script_module(ext)
File "/opt/conda/lib/python3.6/site-packages/torchaudio/extension/extension.py", line 19, in _init_script_module
torch.classes.load_library(path)
File "/opt/conda/lib/python3.6/site-packages/torch/_classes.py", line 46, in load_library
torch.ops.load_library(path)
File "/opt/conda/lib/python3.6/site-packages/torch/_ops.py", line 105, in load_library
ctypes.CDLL(path)
File "/opt/conda/lib/python3.6/ctypes/__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /opt/conda/lib/python3.6/site-packages/torchaudio/_torchaudio.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs