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

issue with torchtext #210

Open
burstman opened this issue Dec 14, 2024 · 1 comment
Open

issue with torchtext #210

burstman opened this issue Dec 14, 2024 · 1 comment

Comments

@burstman
Copy link

torchtext deprecated version i cant use it in the colab:

OSError Traceback (most recent call last)
in <cell line: 8>()
6 import spacy
7 import datasets
----> 8 import torchtext
9 import tqdm
10 import evaluate

5 frames
/usr/lib/python3.10/ctypes/init.py in init(self, name, mode, handle, use_errno, use_last_error, winmode)
372
373 if handle is None:
--> 374 self._handle = _dlopen(self._name, mode)
375 else:
376 self._handle = handle

OSError: /usr/local/lib/python3.10/dist-packages/torchtext/lib/libtorchtext.so: undefined symbol: _ZN2at4_ops5zeros4callEN3c108ArrayRefINS2_6SymIntEEENS2_8optionalINS2_10ScalarTypeEEENS6_INS2_6LayoutEEENS6_INS2_6DeviceEEENS6_IbEE

@catastropiyush
Copy link

I got the same issue.
So I tried

!pip uninstall -y torchtext
!pip install torchtext --no-cache-dir --force-reinstall

But then got this error after importing spacy
AttributeError: np.float_was removed in the NumPy 2.0 release. Usenp.float64 instead.

Again, I tried upgrading spacy
!pip install --upgrade spacy thinc confection srsly cupy

But then this popped up.

---------------------------------------------------------------------------

ValueError                                Traceback (most recent call last)

[<ipython-input-3-8076b315761e>](https://localhost:8080/#) in <cell line: 6>()
      4 import random
      5 import numpy as np
----> 6 import spacy
      7 import datasets
      8 import torchtext

6 frames

/usr/local/lib/python3.10/dist-packages/thinc/backends/numpy_ops.pyx in init thinc.backends.numpy_ops()

ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

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

No branches or pull requests

2 participants