I am posting here because, even though the answer can be found on the forums, it took me several hours to muddle through to a solution.
- Update PyTorch to v 1.6+ from the PyTorch website
- Restart Linux (otherwise the import hangs)
It could be helpful to non-expert users if fastai would detect the problem and print the solution.
fastai’s requirements are all torch >= 1.7, so when installing the library when done correctly this shouldn’t happen… (as a result torch < 1.6 is outright not supported anymore)
I copied someone else’s code and used
git clone...to a fastai directory
pip install -e .
and it turned out this way. But honestly I do not understand much about how git and pip work.