Failed to import torchtext with undefined symbol AutogradMeta

Details can be seen at

I actually have torch built from source and successfully installed. However, even if I have torchtext also successfully built from source and installed, I couldn’t import it and got the following ERROR:

➜  ~ python
Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> import torchtext as tt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "~/.local/lib/python3.10/site-packages/torchtext/", line 6, in <module>
    from torchtext import _extension  # noqa: F401
  File "~/.local/lib/python3.10/site-packages/torchtext/", line 64, in <module>
  File "~/.local/lib/python3.10/site-packages/torchtext/", line 58, in _init_extension
  File "~/.local/lib/python3.10/site-packages/torchtext/", line 50, in _load_lib
  File "~/.local/lib/python3.10/site-packages/torch/", line 568, in load_library
  File "/usr/lib/python3.10/ctypes/", line 374, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: ~/.local/lib/python3.10/site-packages/torchtext/lib/ undefined symbol: _ZTVN5torch8autograd12AutogradMetaE

My torch and torchtext are respectively installed as:

➜  ~ pip show torch
Name: torch
Version: 1.13.0a0+git71dddec
Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration
Author: PyTorch Team
License: BSD-3
Location: ~/.local/lib/python3.10/site-packages
Requires: typing-extensions
Required-by: functorch, lpips, thop, timm, torchdata, torchtext, torchvision
➜  ~ pip show torchtext
Name: torchtext
Version: 0.14.0a0+3f9c349
Summary: Text utilities and datasets for PyTorch
Author: PyTorch core devs and James Bradbury
License: BSD
Location: ~/.local/lib/python3.10/site-packages
Requires: numpy, requests, torch, tqdm

Can anybody give me a hand please??