Platform: Colab (Free; $10/month Pro)

I am trying to run the new course notebook on colab. When I enable the GPU and run the code it says no module found for the fastai stuff. When I change it back to none it works fine.

Edit: Not sure why, but when I logged in again, course v4 was there and the file was different. Leaving this up in case someone else has the same problem. No idea what fixed it.

I am trying to use the “advanced” method using Ngrok. I can get into the Jupyter environment, but when I run the two lines of code (!pip install git_, etc.) to clone the git repo, I am getting the 2019 version of the course. The actual URL appears to direct to the newer version. In my Jupyter notebook directory there is a file called “” that looks like this:

I’m not completely clear on how the pip install command is working, but it looks like it is implementing a git clone command directing to the old course. Am I doing something wrong? Any idea how to fix this? I love the idea of working in a Jupyter environment rather than Collab.

That file is designed for v3. There is no bash for v4. Instead we have fastbook and fastbook.setup()

1 Like

Thanks. That bash file (as far as I can tell) is coming from the URL in subprocess. Anyway, it’s working now. Maybe fastbook.setup() did it.

Any idea why I can’t use widgets, though? I thought that they were supposed to work, but I can’t get ImageClassifierCleaner to work (just shows images, no widget). Oddly, it did work in Collab. I tried installing the ipywidgets using pip as per the docs, but it was already there.

Also, I seem to have persistent storage in the master directory of the Jupyter notebook, but those files are not on my Google Drive. Where are those files being stored?

Do we have to upgrade fast ai every time we run the notebooks, and also do we have to mount the drive everytime. What features does pro offer? Is there any basic setup instructions that I can look at.

1 Like

I got error running this code after successfully ran fastai2 install and drive mount. I checked, I don’t have fastbook in my ‘My Drive’. Appreciate any help!

How do I fix the following error in Colab when trying to run the examples in 01_intro.ipynb?

!pip install -Uqq fastbook
import fastbook

     |████████████████████████████████| 727kB 2.7MB/s 
     |████████████████████████████████| 51kB 6.3MB/s 
     |████████████████████████████████| 194kB 50.3MB/s 
     |████████████████████████████████| 1.1MB 36.5MB/s 
     |████████████████████████████████| 51kB 6.4MB/s 
     |████████████████████████████████| 51kB 5.9MB/s 
     |████████████████████████████████| 92kB 10.2MB/s 
     |████████████████████████████████| 40kB 4.7MB/s 
     |████████████████████████████████| 51kB 6.3MB/s 
     |████████████████████████████████| 61kB 7.2MB/s 
     |████████████████████████████████| 2.6MB 35.6MB/s 
ERROR: fastai 2.0.18 has requirement fastcore<1.3,>=1.1, but you'll have fastcore 1.3.1 which is incompatible.

I had the same problem with paperspace but was able to add the following flag --use-feature=2020-resolver in the terminal when following the initial setup steps to resolve. This option isn’t available in Colab.

I’d appreciate some help trying to resolve this.


1 Like

when running the first box in the setup, this is what I got:

ERROR: torchtext 0.9.0 has requirement torch==1.8.0, but you’ll have torch 1.7.1 which is incompatible.

Does it matter? If yes, what should I do?

Hi Chrisl-Lai hope all is well!

The notebook may still run okay with this error, I would just run the notebook and raise a pull request if the error causes any of the cells to not to run. The error seems to be pointing to torchtext I am not sure if this notebook uses torchtext, if it doesn’t you should be okay.

I tried installing version 1.8.0 but recieved an error saying
fastai 2.2.7 required 1.7.1.

Hi @muellerzr is this something that needs a library fix?

Cheers mrfabulous1 :smiley: :smiley:

Same error for me using Colab. Hasn’t effected anything I’ve been doing so far.

I’ve seen the same problem.

This evening March 9, 2021, at ~9:20 pm EST. We stopped being able to load into our colab environments.

The line

!pip install -Uqq fastbook

seemed to freeze up.

To see what is going on I update the pip install to

!pip install -U fastbook
We end up with the error.

ERROR: torchtext 0.9.0 has requirement torch==1.8.0, but you’ll have torch 1.7.1 which is incompatible.
Installing collected packages: sentencepiece, fastcore, torch, torchvision, fastai, ghapi, fastrelease, nbdev, fastbook
Found existing installation: torch 1.8.0+cu101
Uninstalling torch-1.8.0+cu101:
Successfully uninstalled torch-1.8.0+cu101
Found existing installation: torchvision 0.9.0+cu101
Uninstalling torchvision-0.9.0+cu101:
Successfully uninstalled torchvision-0.9.0+cu101
Found existing installation: fastai 1.0.61
Uninstalling fastai-1.0.61:
Successfully uninstalled fastai-1.0.61
Successfully installed fastai-2.2.7 fastbook-0.0.16 fastcore-1.3.19 fastrelease-0.1.11 ghapi-0.1.16 nbdev-1.1.13 sentencepiece-0.1.95 torch-1.7.1 torchvision-0.8.2

And it took 2-3 times longer to load.

That said if I’m patient it did eventually load. And I was able to proceed.

This problem was verified on two different accounts from different part of the US.

It looks like torchtext may have an updated version, and pip is having to do a lot more work than usual to pull the right libraries together to make things work.

1 Like

(I tried answering on your other thread but you deleted it, so posting here):

You should install it based on the following:

!pip install torchtext==0.8.1
!pip install -U fastbook

This way the proper torch versions etc will be installed. fastai does not officially support torch 1.8 yet, so you’ll still throw an error of:
ERROR: torchvision 0.9.0+cu101 has requirement torch==1.8.0, but you'll have torch 1.7.1 which is incompatible.

But the right packages will be installed later

The issue is torch breaking fastai’s requirements based upon what comes preinstalled in colab



Thanks. I’ve not been around in a while, and I thought that the question in the other forum, might have been in the wrong place.

I’ll give the code snippets you suggest here a quick try.

…time passes…

Things seem to be working. Just the error message.

Do you know if and how a change like this will be updated in the Co-Lab areas of the code?

Well, we’re working on that :wink: We do a lot to make sure that Google Colab is a guaranteed working platform, so once issues arises we tend to take care of them quickly

(pointing it out on the forums is one of the best ways to get my attention, and I watch out for Colab-related issues)


Looking forward to hearing about your success in updating this colab experience.

Thank-you. Please do keep us updated.

Colab just allowed me to subscibe for Colab Pro ( I’m from France ) without doing anything special (no VPN no US bank card). Their doc still show that it’s still available just in US and Canada but I think it will change soon.

Cheers !


They just announced that pro is now available in:
Brazil, France, Germany, India, Japan, Thailand, and the UK!