【问题标题】:Why can't torchtext find a symbol _ZN2at6detail10noopDeleteEPv?为什么torchtext找不到符号_ZN2at6detail10noopDeleteEPv?
【发布时间】:2021-11-12 16:25:33
【问题描述】:

为什么torchtext找不到这个符号?

(synthesis) miranda9~/ultimate-utils $ python ~/type-parametric-synthesis/src/main.py --reproduce_10K --serial --debug --num_workers 0



Traceback (most recent call last):
  File "/home/miranda9/type-parametric-synthesis/src/main.py", line 32, in <module>
    from data_pkg.data_preparation import get_dataloaders, get_simply_type_lambda_calc_dataloader_from_folder
  File "/home/miranda9/type-parametric-synthesis/src/data_pkg/data_preparation.py", line 10, in <module>
    from torchtext.vocab import Vocab, vocab
  File "/home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages/torchtext/__init__.py", line 5, in <module>
    from . import vocab
  File "/home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages/torchtext/vocab.py", line 13, in <module>
    from torchtext._torchtext import (
ImportError: /home/miranda9/miniconda3/envs/synthesis/lib/python3.9/site-packages/torchtext/_torchtext.so: undefined symbol: _ZN2at6detail10noopDeleteEPv

【问题讨论】:

标签: pytorch


【解决方案1】:

用当前版本的pytorch重新安装torchtext:

例如

conda install -y torchtext -c pytorch

或者对于旧版本的 pytorch torchtext ImportError in colab

conda install -y torchtext==0.8.0 -c pytorch

虽然总的来说,根据我的经验,torchtext 似乎可以自行安装正确版本的 pytorch...

参考:https://github.com/PyTorchLightning/pytorch-lightning/issues/4533

【讨论】:

    猜你喜欢
    • 2019-08-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多