"No module named 'fastai.conv_learner'"


#1

I’m getting this error on Google Collab. First I run this command to install the Fast AI library:

!pip install git+https://github.com/fastai/fastai.git

Then I run this command to import conv_learner:

from fastai.conv_learner import*

But I keep getting the error “No module named ‘fastai.conv_learner’”. Does anyone know why this could be?

And does anyone know how to download the data for the satellite images for lesson 3?


#2

I have the same problem after I updated fastai. The directory structure has changed, The conv_learner has moved from the directory fastai/fastai to fastai/old/fastai. You may need t change the symlinks.


(Nikhil) #3

You can try by adding fastai to sys.path
or
by creating simulink to fastai folder in your work directory.


(Jeremy Howard (Admin)) #4

I strongly recommend beginners don’t use the pip fastai - use the git clone plus symlink method shown in the course. We ensure that stays compatible with the course material, whilst the pip module will be continually updated.