No Module Named fastai.structured | Google Colab

Google’s colab jupyter notebook decided to stop working today. After I pip install and import the necessary packages, the from fastai.structured import * fails with the message that no module with such a name exists. It worked at the start of 2018-10-01, but stopped working in the afternoon.

I tried pip install fastai by itself as well as the directions on the fastai github page.

I know I have other options, but colab is free, as in beer…

Any ideas on what might have happened would be appreciated.


I just ran in to the same thing. I have two versions of the repo, one from this afternoon and one from this morning and the directory containing the fastai library is drastically different between the two. The most recent pull of the repo is missing the file.

The has been moved to folder “old” (in anticipation to fastai_v1).

Switching from !pip install fastai to !pip install fastai==0.7.0 fixed the issue for me.


Official update from J. Howard here.


Thank you very much for the advice. Designating the version of fastai worked for me, too. Gracias. Danke schon. Grazi. Etc.

1 Like

I was struggling with this problem from past 6 hours:sweat:…thank you so much!!:grinning:

1 Like

I also switched to fastai==0.7.0 but now I am getting this error

/usr/local/lib/python3.6/dist-packages/fastai/ in ()
3 from enum import IntEnum
----> 5 def scale_min(im, targ, interpolation=cv2.INTER_AREA):
6 “”" Scales the image so that the smallest axis is of size targ.

NameError: name ‘cv2’ is not defined

did someone else faced this issue too? I am stuck for a while.

I am getting
RuntimeError: PyTorch does not currently provide packages for PyPI while

I followed on windows 10 machine
conda install pytorch-cpu -c pytorch
pip3 install torchvision
pip install fastai==0.7.0

Please go through this article. I’ve tried and works 100%

1 Like

This works for me on Kaggle. Thx.