I installed torchtext with Conda and also tried pip to see if it would fix the problem, I even uninstalled it with pip twice and reinstalled it but the same error keeps popping up when I try to import torchtext.
ImportError Traceback (most recent call last)
in
----> 1 import torchtext
~/opt/anaconda3/envs/SpacyEnv/lib/python3.9/site-packages/torchtext/init.py in
3 from . import datasets
4 from . import utils
----> 5 from . import vocab
6 from . import legacy
7
~/opt/anaconda3/envs/SpacyEnv/lib/python3.9/site-packages/torchtext/vocab.py in
11 from typing import Dict, List, Optional, Iterable
12 from collections import Counter, OrderedDict
—> 13 from torchtext._torchtext import (
14 Vocab as VocabPybind,
15 )
ImportError: dlopen(/Users/…/opt/anaconda3/envs/SpacyEnv/lib/python3.9/site-packages/torchtext/_torchtext.so, 2): Symbol not found: __ZN2at6detail10noopDeleteEPv
Referenced from: /Users/…/opt/anaconda3/envs/SpacyEnv/lib/python3.9/site-packages/torchtext/_torchtext.so
Expected in: /Users/…/opt/anaconda3/envs/SpacyEnv/lib/python3.9/site-packages/torch/lib/libtorch_cpu.dylib
in /Users/…/opt/anaconda3/envs/SpacyEnv/lib/python3.9/site-packages/torchtext/_torchtext.so