Beginner: Setup ✅

Looks like fastai might not be installed. You can check the fastai version by doing something like

import fastai
fastai.__version__ 

I’ve never used Azure ML so can’t help much in the setup type issue, but sometimes the path points to the wrong location and that means your modules don’t properly get loaded.

!which python
!which conda

would probably show where these binaries are being looked up from.

HTH.

1 Like

I think it it’s because of the environment. I switched the default (Python 3) environment and installed using

!pip install -c fastai=2.7.4
!pip install fastbook==0.0.26

and I was able to import the libraries.

Thank you!

1 Like

On Kaggle I’ve noticed that…
!which python
says…
/opt/conda/bin/python

which leaves me wondering if I would be better installing fastai using…
!conda install --yes -c fastai fastai
rather than !pip install -U fastai.

In terms of time…
Conda takes longer, since it upgrades 50 odd packages.
Pip is quicker, since it only complains about the dependencies it can’t check.

these links are giving a 404 error. they are probably broken. I noticed that issue when 2022 course is made available to all.

What links are you referring to?

at the top of this page, there were links for setup help on Colab, Paperspace Gradient, Jarvislab, etc. when you click it, you will be redirected to the course.fast,ai site and at the relevant section.
since this 2022 course has been released I cannot see this. in the below screenshot, you will notice there are sections on how to set up a notebook server and a full Linux server. this is missing in the new site. and at top of this thread, the links for the same were provided.
I hope I am able to convey my message.

2 Likes

@vivekharshey1 Thanks for the heads up. Those stale links have now been removed.
btw, The first half dozen Live Coding videos provide a good intro to setup Paperspace,

1 Like

okay, thanks. however I found those links still to be a good starting point. Particularly Jarvis lab page was updated recently,

Hey,

I am trying to run fast book on my machine (mac os intel) I have done the setup using mambaforge, and installed fastai jupiter-lab and fastbook.

#hide
! [ -e /content ] && pip install -Uqq fastbook
import fastbook
fastbook.setup_book()

When I try to execute the first cell, the kernel restarts:
The kernel for 02_production.ipynb appears to have died. It will restart automatically.

Any clues on what to look into?

Hello, I’m following along with the course, but am having trouble installing fastai. Below is an example where even on HF it cannot find the fastai module. However this happens on my local machine as well. I have Windows 11. I installed WSL Ubuntu and followed the course instructions to install fastai on my virtual linux environment. However, whenever I try to run some test code from VS, it also cannot find the fastai module. Where is it?

Try pip install fastai in the terminal

1 Like

Thank you. That worked, to an extent. I’m left curious why I’m doing this all on my Windows machine. Then I wonder why I needed to install that virtual linux machine. But I’m seeing now that it still doesn’t work in windows because
NotImplementedError : cannot instantiate ‘PosixPath’ on your system”

What I need to do is connect my Visual Studio with my wsl Ubuntu. I think. Trying to figure that out now. Any advice is appreciated. Thanks in advance.

Check it out! Should help!

1 Like

You’ll need ‘fastai’ in your requirements.txt. See the tutorial discussed in the lesson for details.

Thank you. That worked. Where is the tutorial? I’ve only finished the first two chapters of the book.

It’s discussed in lesson 2 (video) and the associated forum thread.

Found out the root cause of the issue:

1 Like

figured out that I’m looking at the old instruction. . .

Hello,

I’m on GCP.
After creating the instance, the Step 4 instruction says ’ cd tutorials/fastai/course-v3.’ However, there isn’t a ‘fastai’ folder in ‘tutorials’. So I created a new ‘fastai’ and the a ‘course-v3’ folder.

Then when I ran ‘git checkout .’ I got “error: pathspec ‘.’ did not match any file(s) known to git”

Any suggestion?

Thanks