Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add torch version number to requirements.txt #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Eunchan24
Copy link

Hi, thank you for creating such an amazing repository for tackling this challenging problem.

When installing PyTorch according to the requirements file provided in this project, the version number is not specified, which leads to the installation of PyTorch version 2.5.1 by default. However, this version is not compatible with torchtext, resulting in an import error when trying to use torchtext.

Here is an example of the error encountered:

(unitable) ➜  unitable git:(main) ✗ python 
Python 3.9.20 (main, Oct  3 2024, 07:27:41) 
[GCC 11.2.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
t>>> torch.__version__
'2.5.1+cu124'
>>> import torchtext
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/danny/miniconda3/envs/unitable/lib/python3.9/site-packages/torchtext/__init__.py", line 18, in <module>
    from torchtext import _extension  # noqa: F401
  File "/home/danny/miniconda3/envs/unitable/lib/python3.9/site-packages/torchtext/_extension.py", line 64, in <module>
    _init_extension()
  File "/home/danny/miniconda3/envs/unitable/lib/python3.9/site-packages/torchtext/_extension.py", line 58, in _init_extension
    _load_lib("libtorchtext")
  File "/home/danny/miniconda3/envs/unitable/lib/python3.9/site-packages/torchtext/_extension.py", line 50, in _load_lib
    torch.ops.load_library(path)
  File "/home/danny/miniconda3/envs/unitable/lib/python3.9/site-packages/torch/_ops.py", line 1350, in load_library
    ctypes.CDLL(path)
  File "/home/danny/miniconda3/envs/unitable/lib/python3.9/ctypes/__init__.py", line 382, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /home/danny/miniconda3/envs/unitable/lib/python3.9/site-packages/torchtext/lib/libtorchtext.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs

To resolve this issue, I have added version numbers for torch, torchvision, torchaudio, and torchtext that are compatible with each other. This ensures seamless installation and execution of the project. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant