Kaggle notebook versioning issue

Hi I am trying to get fastai v2 to work in a kaggle notebook. I see the error ‘No module named ‘fastai.callback.all’; ‘fastai.callback’ is not a package’

However I think the underlying problem is that the wrong version is installed. Here is my code:

!pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f 
https://download.pytorch.org/whl/torch_stable.html

!pip install fastai==2.0.13

import fastai
print(fastai.__version__)

from fastai.vision.all import *

fastai appears to be installed correctly, I get the message:

Requirement already satisfied: fastai==2.0.13 in /opt/conda/lib/python3.7/site-packages (2.0.13)

However when I check the version (print(fastai.version) I see 1.0.61

Have I missed a step?

If anyone else stumbles across this. This code seems to work now. I think it must be something to do with the session in kaggle

The default docker image for the Kaggle Notebook environment was updated to include FastAI 2.0 earlier this afternoon:

1 Like

awesome thanks

1 Like

I’ve got similar issue, what to do?

Now it’s updated if you start a new notebook and import fastai and import torch. It should just work?

Let me know if it doesn’t, and what error you are seeing.