I have PyTorch installed in my machine but whenever I try to do the following-
from torchtext import data
from torchtext import datasets
I get the following error.
ImportError: No module named 'torchtext'
How can I install torchtext?
This library is part of the PyTorch project. PyTorch is an open source machine learning framework.
As stated in the PyTorch forum, simply do:
$ pip install https://github.com/pytorch/text/archive/master.zip
That should do it.
If not, as an alternative, try:
$ pip install torchtext
For more advanced options, dependencies, and customized installations see:
pypi.org/project/torchtext
Try
pip install torchtext
For more details on installation please read pytorch github
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With