Error in line on of 01_intro "No module named 'fastbook' "

Hello All,

I want to run the notebooks for the course on my own PC, not on the google COLAB. Course 1 worked fine on COLAB, but is given me trouble when i run it on my own PC.

I run the code 1st line of code:

!pip install -Uqq fastbook
import fastbook

I Get :

ERROR: Could not find a version that satisfies the requirement torch<1.7,>=1.6 (from fastai<2.1,>=2.0->fastbook) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch<1.7,>=1.6 (from fastai<2.1,>=2.0->fastbook)


ModuleNotFoundError Traceback (most recent call last)
1 #hide
2 get_ipython().system(‘pip install -Uqq fastbook’)
----> 3 import fastbook
4 fastbook.setup_book()

ModuleNotFoundError: No module named ‘fastbook’

Now I have already installed all the packages when I ran the code (No errors occured):

conda install -c fastai -c pytorch -c anaconda fastai gh anaconda

Maybe this has to do with the new version of fastai that recently came out. Im not sure.

Also quick side noob question. What is the difference between Conda install and Pip install. Should they both be run in the jupyter notebook command prompt?

Hi Peter,
I would suspect your versions of PyTorch and FastAI are not compatible. I am using Gradient and on those machines, the versions that are working are :
fastai version : 2.0.11
torch version : 1.6.0
fastbook version : 0.0.12
You may want to try them.

Hope it helps !

1 Like

I made a new env specifically to run these lesson in anaconda.

I used the commands:

conda install pytorch==1.6.0 torchvision==0.7.0 -c pytorch


pip install fastai==2.0.11

It is now working. Thanks nn.Charles!