---------------------------------------------------------------------------
OSError Traceback (most recent call last)
Cell In[12], line 12
10 import pandas as pd
11 import altair as alt
---> 12 from torchtext.data import to_map_style_dataset
13 from torch.utils.data import DataLoader
14 from torchtext.vocab import build_vocab_from_iterator
File /opt/homebrew/lib/python3.11/site-packages/torchtext/__init__.py:18
15 _WARN = False
17 # the following import has to happen first in order to load the torchtext C++ library
---> 18 from torchtext import _extension # noqa: F401
20 _TEXT_BUCKET = "https://download.pytorch.org/models/text/"
22 _CACHE_DIR = os.path.expanduser(os.path.join(_get_torch_home(), "text"))
File /opt/homebrew/lib/python3.11/site-packages/torchtext/_extension.py:64
59 # This import is for initializing the methods registered via PyBind11
60 # This has to happen after the base library is loaded
61 from torchtext import _torchtext # noqa
---> 64 _init_extension()
File /opt/homebrew/lib/python3.11/site-packages/torchtext/_extension.py:58, in _init_extension()
55 if not _mod_utils.is_module_available("torchtext._torchtext"):
56 raise ImportError("torchtext C++ Extension is not found.")
...
378 self._handle = handle
OSError: dlopen(/opt/homebrew/lib/python3.11/site-packages/torchtext/lib/libtorchtext.so, 0x0006): Symbol not found: __ZN3c105ErrorC1ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_PKv
Referenced from: /opt/homebrew/lib/python3.11/site-packages/torchtext/lib/libtorchtext.so
Expected in: /opt/homebrew/lib/python3.11/site-packages/torch/lib/libc10.dylib
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
речь идет о версиях? Как это исправить?
Заранее спасибо.
Я только начал изучать аннотированный преобразователь. И у меня возникла ошибка при импорте. Ошибка указывает на импорт: [code]from torchtext.data.functional import to_map_style_dataset [/code] имеет эту информацию: [code]--------------------------------------------------------------------------- OSError Traceback (most recent call last) Cell In[12], line 12 10 import pandas as pd 11 import altair as alt ---> 12 from torchtext.data import to_map_style_dataset 13 from torch.utils.data import DataLoader 14 from torchtext.vocab import build_vocab_from_iterator
File /opt/homebrew/lib/python3.11/site-packages/torchtext/__init__.py:18 15 _WARN = False 17 # the following import has to happen first in order to load the torchtext C++ library ---> 18 from torchtext import _extension # noqa: F401 20 _TEXT_BUCKET = "https://download.pytorch.org/models/text/" 22 _CACHE_DIR = os.path.expanduser(os.path.join(_get_torch_home(), "text"))
File /opt/homebrew/lib/python3.11/site-packages/torchtext/_extension.py:64 59 # This import is for initializing the methods registered via PyBind11 60 # This has to happen after the base library is loaded 61 from torchtext import _torchtext # noqa ---> 64 _init_extension()
File /opt/homebrew/lib/python3.11/site-packages/torchtext/_extension.py:58, in _init_extension() 55 if not _mod_utils.is_module_available("torchtext._torchtext"): 56 raise ImportError("torchtext C++ Extension is not found.") ... 378 self._handle = handle
OSError: dlopen(/opt/homebrew/lib/python3.11/site-packages/torchtext/lib/libtorchtext.so, 0x0006): Symbol not found: __ZN3c105ErrorC1ENSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES7_PKv Referenced from: /opt/homebrew/lib/python3.11/site-packages/torchtext/lib/libtorchtext.so Expected in: /opt/homebrew/lib/python3.11/site-packages/torch/lib/libc10.dylib Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings... [/code] речь идет о версиях? Как это исправить? Заранее спасибо.