Error: No matching distribution found for torch<0.4

Python Version: 3.10.2
OS: Windows
AMD Graphics

I am a beginner and just trying to install fastai on my windows system. I tried to install fastai using Anaconda, but in jupyter notebook, it showed the error “No module name fastai.imports”. Then I tried on Google colab there it showed the error “No module named fastai.structured”.

With the help of forums on fastai, I tried to update my fastai with “pip install fastai to pip install fastai==0.7.0” to solve the above errors, while updating it showed another error “Could not find a version that satisfies the requirement torch<0.4 (from fastai) (from versions: 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.11.0)
ERROR: No matching distribution found for torch<0.4”.

Can anyone please help me?

is that your intention to install 0.7 version? current version of fastai is v2

It’s not my intention to install the 0.7 version. I looked for the solutions here for the above error, there I have seen this updating to 0.7 version worked for some people. I tried it with that version.
Can you please tell me how to solve this error? I was stuck here for the past few weeks

Try this instructions for windows

Or install wsl2 and then you have Linux machine almost. With recent version of windows theres GPU support too

Edit: it should work on colab with the provided colab notebooks in the course page

I have been trying in the google colab notebook with the inbuilt libraries, but while running Lesson 1 - Intro to Random forests it’s showing an error “No module named fastai.structured”

Ok. So you are following the Machine learning course?
That’s old course, not maintained anymore. Was replaced by DL for coders.

Yes, I am a beginner and learning the machine learning course now. How can I update to the latest course? is the latest course

Are you wanting to learn traditional ML (random forests, regression, etc) or deep learning? There is a slightly older traditional ML course (Intro to Machine Learning: Lesson 1 - YouTube) that I believe is still relevant for in industry or deep learning ( Zach Mueller put together a gist on installing on Windows here with WSL2 (Explicit directions for how I setup Ubuntu Subsystem with conda, pip, python, and had it mounted from the D directory · GitHub). I have Ubuntu set up on my machine for deep learning, but I did some experimenting with getting installed on Windows without using WSL2 and could not get it working. If you just want to get up and running quickly and more easily, then Colab is probably your best bet (Using Colab | Practical Deep Learning for Coders).

I want to learn traditional ML because I am a beginner in ML. Yes, I have seen the videos of older traditional ML course on youtube. I tried to run the older ML course Lesson -1 -Intro to random forests in jupyter and as well as colab. In jupyter I was getting the error “No module named fastai.imports”
I tried with google colab then it’s showing a error “No module named fastai.structured”. I am trying in different ways but it’s not working.

Now, I am trying with wsl2.

The traditional ML course was built on an old version of the library. If you want to run the code examples from the course, you’ll have to install the library version that was ‘current’ when that course was produced. It looks like you also posted to that forum topic, but I don’t think anyone answered about helping with that version Fastai v0.7 install issues thread - #111 by vk73. I don’t know how to get the old version of (and other old dependencies like pytorch) installed and it might be tough given how old it is.

If the only reason you’re doing the ML course is because you’re a beginner, I would just switch to the latest version of the DL For Coders 2020 course and skip the ML course. If you are specifically interested in ML for school/work/personally then at least listening to the ML course is probably worth it, but following along with code might be a challenge because the old version of the library is no longer supported.

I’m sorry I can’t help more with this. Good luck!

1 Like