Skip to content

ModuleNotFoundError: No module named 'torchtext' #360

@trtm

Description

@trtm

Hello 👋

I get the following error message, when I want to import torchtext:

----> 1 import torchtext

ModuleNotFoundError: No module named 'torchtext'

The issue is the same as already asked on Stackoverflow by another torchtext user!

I run torch==0.4.0 with python==3.6.5.

This error occurs while importing the library from within Jupyter (Notebook & Lab), with jupyter==1.0.0 and jupyterlab==0.33.4.

Importing the same library form the terminal within the Python prompt works (in the same env).

I tried the following options and got the same error message:

  1. with Anaconda3 and this command conda install -c derickl torchtext
  2. with my own Python3 virtualenv and several options like pip install https://github.com/pytorch/text/archive/master.zip for resulting torchtext version 0.3.0, with pip install torchtext for torchtext version 0.2.3 and all other versions up until 0.2.1.

After each run I completely reset the env I worked in, so there I exclude this as an possible error.

Can someone replicate this issue?
How should I proceed?
Is this maybe caused by Jupyter itself?

All the best! ✌️

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions