Hi, starting the fastai course using Colab. In the app_jupyter.ipynb, I received a failure on
!pip install -Uqq fastbook
ERROR: torchtext 0.9.0 has requirement torch==1.8.0, but you’ll have torch 1.7.1 which is incompatible.
Any pointers on where to go next, I did some searches and did not get a useful hit.
I think this problem is still in the process of being resolved.
The link below should help and the other posts will give an idea of whats happening.
(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…
You should downgrade colab pytorch right now.
When you do
pip install fastai
it will downgrade to 1.7 and it should work.
torchtext is not used so it shouldn’t impact fastai.
It still happens:
! [ -e /content ] && pip install -Uqq fastai # upgrade fastai on colab
|████████████████████████████████| 194kB 6.5MB/s
|████████████████████████████████| 776.8MB 19kB/s
|████████████████████████████████| 12.8MB 31.2MB/s
|████████████████████████████████| 61kB 6.0MB/s
ERROR: torchtext 0.9.1 has requirement torch==1.8.1, but you’ll have torch 1.7.1 which is incompatible.
You will have to do !pip uninstall torchtext
I had a similar issue where I installed fastai with pip. I got the ‘No module named fastai’ error whenever I tried to import fastai, but if I did “pip freeze | grep fastai” in the terminal, it showed that fastai was clearly installed.
The solution for me was to download anaconda3, enter an anaconda environment, and reinstall fastai with conda using step 6 of fastai’s setup instructions for using AWS EC2 instances.