No Module Named fastai.structured | Google Colab


#1

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.


(Scott Chamberlin) #2

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 structured.py file.


(Andrei) #3

The structured.py has been moved to folder “old” (in anticipation to fastai_v1). https://github.com/fastai/fastai/blob/master/old/fastai/structured.py


(Zach) #5

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


#6

Official update from J. Howard here.


#7

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


(Ashwini B M) #8

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


(Amit kashyap) #9

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

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

NameError: name ‘cv2’ is not defined

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


(Vijayendra) #10

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


(Saidur Rahman) #11

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