Traceback (most recent call last):
File "/Users/clark/Python Learning/PinYin-torch/PolyphoneDisambiguation-master/Code/PolyphoneDisambiguation/DataProcessing/preprocessing.py", line 9, in <module>
from torchtext.data import Field, TabularDataset
File "/Users/clark/opt/anaconda3/envs/pytorch/lib/python3.8/site-packages/torchtext/__init__.py", line 40, in <module>
_init_extension()
File "/Users/clark/opt/anaconda3/envs/pytorch/lib/python3.8/site-packages/torchtext/__init__.py", line 36, in _init_extension
torch.ops.load_library(ext_specs.origin)
File "/Users/clark/opt/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/_ops.py", line 105, in load_library
ctypes.CDLL(path)
File "/Users/clark/opt/anaconda3/envs/pytorch/lib/python3.8/ctypes/__init__.py", line 381, in __init__
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/clark/opt/anaconda3/envs/pytorch/lib/python3.8/site-packages/torchtext/_torchtext.so, 6): Symbol not found: __ZN3c104impl23ExcludeDispatchKeyGuardC1ENS_14DispatchKeySetE
Referenced from: /Users/clark/opt/anaconda3/envs/pytorch/lib/python3.8/site-packages/torchtext/_torchtext.so
Expected in: /Users/clark/opt/anaconda3/envs/pytorch/lib/python3.8/site-packages/torch/lib/libc10.dylib
in /Users/clark/opt/anaconda3/envs/pytorch/lib/python3.8/site-packages/torchtext/_torchtext.so
運行程式老報這個錯誤,請問該如何解決?
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/230798.html
