pytorch/text

torchtext main branch doesn't support pytorch2.0

Open

#2,052 建立於 2023年2月10日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Python (3,396 star) (822 fork)batch import
good first issue

描述

Hi,

I want to build torchtext from source by using 'python setup.py clean install'. the version of pytorch I used is 2.0.0. But it report the following error:

Installed /home/yangqun/miniconda3/envs/pt/lib/python3.8/site-packages/torchtext-0.15.0a0+9db75ab-py3.8-linux-x86_64.egg
Processing dependencies for torchtext==0.15.0a0+9db75ab
error: torch 2.0.0a0+git13b3d86 is installed but torch==1.13.1 is required by {'torchdata'}

When I try to import torchtext, the following error is reported;

>>> import torch
>>> import torchtext
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/yangqun/text/torchtext/__init__.py", line 6, in <module>
    from torchtext import _extension  # noqa: F401
  File "/home/yangqun/text/torchtext/_extension.py", line 64, in <module>
    _init_extension()
  File "/home/yangqun/text/torchtext/_extension.py", line 56, in _init_extension
    raise ImportError("torchtext C++ Extension is not found.")
ImportError: torchtext C++ Extension is not found.

Could anyone point me how can I use torchtext with torch 2.0.0 ?

貢獻者指南