Beginner: Setup ✅

To answer my own question - by following the error message to anaconda.org and searching for those packages, I got the suggestion of changing the installation commands to
conda install fastchan::fastai
conda install fastai::nbdev
conda install fastai::fastai

which seemed to fix the issue (though I still needed to run conda install notebook separately to the nbdev installation to get the jupyter notebook command to be recognised.

Python 3.09 is no longer available for download, but 3.11 seems to work while 3.12 gave me a bunch of errors.

Edit: However, I’m finding that my gaming rig is running the first_training exercise much slower than the Colab environment. Probably it’s a good idea to follow the lesson’s advice and use Colab or another web-based notebook rather than running these locally.

I’m using Jarvislab’s fastai instance and then tried to run stable_diffusion on it. I ran into this “Error displaying widget” error. I couldn’t find another post on this forum about this error. I’ve split the cells and I know that this is caused by notebook_login(). Can I get a hint on which libraries versions should I check for? Every library was up to date except for huggingface. Yet, the error persists.

I just started the course on kaggle and didnt find any requirements.txt in the course or this forum (with forum search). Is there a requirements.txt somewhere that I can use for kaggle? There are tons of dependency errors and I didnt do anything on kaggle prior to this course.
I will use a virtual environment but still a requirements.txt from someone running it on kaggle would be super helpful.

It seems like the course is a bit outdated as the default package versions on kaggle being too recent is mostly the problem.

Guys, I just used Colab. It just works. Also, Colab is much faster than paperspace at loading these huge pretrained models.

I took about 2 days to figure out setting up a custom conda environment and using Jupyter notebooks locally. Locally because I found it to be more snappy than using Google Colab. Overall, I got tired of things not working, and bless Jeremy, but I couldn’t follow the conflicting instructions in the videos and the book. I did a little writeup that may help you. This specifically is for lesson 2: Setting Up for Fast.ai Deep Learning . This just covers the conda environment and necessary packages. Using Jupyter locally and fixing the book’s Python code will come next. Though I’ll just probably share my GitHub repo of my local Jupyter updates.

Did you solve issue?
I’m facing same issue myself.

Hi,

a lack of the ‘ipywidgets’ often cause this problem. You can install this module or use in the terminal cli loggin:

python -m pip install huggingface_hub
huggingface-cli login

Shift + insert to paste a token. It’s normal that it looks like nothing is pasted. Push enter button.

Hello Everyone, I am a complete beginner to ML, with a little experience in python.
I just cloned the GitHub repo GitHub - fastai/fastbook: The fastai book, published as Jupyter Notebooks
Now I opened up 01_intro.ipynb in my M3 MacBook Pro’s Jupyter notebook , and when I run the following cell, the kernel is dying and python quits.

from fastai.vision.all import *
path = untar_data(URLs.PETS)/'images'

def is_cat(x): return x[0].isupper()
dls = ImageDataLoaders.from_name_func(
    path, get_image_files(path), valid_pct=0.2, seed=42,
    label_func=is_cat, item_tfms=Resize(224))

learn = vision_learner(dls, resnet34, metrics=error_rate)
learn.fine_tune(1)

So, I tried running the above code in Visual studio and I get the following error

[W NNPACK.cpp:53] Could not initialize NNPACK! Reason: Unsupported hardware.
epoch train_loss valid_loss error_rate time
zsh: segmentation fault python3 test.py----------------------------------------------------------------------| 0.00% [0/92 00:00<?]

I have tried to google the issue, I couldn’t find anything beginner friendly, can someone please help me out.

Thank you

Hello everyone! I’m a new learner with minimal/introductory experience in python that I will be learning throughout (parallel) to this course. I wanted to run the notebooks without needing the kaggle, so on my own machine. Are all of my steps good?

I have installed miniconda, and put python, fastai, pytorch, and jupyterlab on it

then, when i run jupyter notebook, i am able to download the kaggle code and put it on my local instance. Is there anything that I might be missing or any problems I’ll run into in the future? Thanks all!

Hello. I’ve made a copy on Kaggle of the first lesson in the fast ai course.

It immediately throws an error at the 2nd cell:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow-io 0.21.0 requires tensorflow-io-gcs-filesystem==0.21.0, which is not installed.
explainable-ai-sdk 1.3.2 requires xai-image-widget, which is not installed.
dask-cudf 21.10.1 requires cupy-cuda114, which is not installed.
tensorflow 2.6.2 requires numpy~=1.19.2, but you have numpy 1.20.3 which is incompatible.
tensorflow 2.6.2 requires six~=1.15.0, but you have six 1.16.0 which is incompatible.
tensorflow 2.6.2 requires typing-extensions~=3.7.4, but you have typing-extensions 3.10.0.2 which is incompatible.
tensorflow 2.6.2 requires wrapt~=1.12.1, but you have wrapt 1.13.3 which is incompatible.
tensorflow-transform 1.5.0 requires absl-py<0.13,>=0.9, but you have absl-py 0.15.0 which is incompatible.
tensorflow-transform 1.5.0 requires numpy<1.20,>=1.16, but you have numpy 1.20.3 which is incompatible.
tensorflow-transform 1.5.0 requires pyarrow<6,>=1, but you have pyarrow 6.0.1 which is incompatible.
tensorflow-transform 1.5.0 requires tensorflow!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,<2.8,>=1.15.2, but you have tensorflow 2.6.2 which is incompatible.
tensorflow-serving-api 2.7.0 requires tensorflow<3,>=2.7.0, but you have tensorflow 2.6.2 which is incompatible.
flake8 4.0.1 requires importlib-metadata<4.3; python_version < "3.8", but you have importlib-metadata 4.11.3 which is incompatible.
featuretools 1.6.0 requires numpy>=1.21.0, but you have numpy 1.20.3 which is incompatible.
dask-cudf 21.10.1 requires dask==2021.09.1, but you have dask 2022.2.0 which is incompatible.
dask-cudf 21.10.1 requires distributed==2021.09.1, but you have distributed 2022.2.0 which is incompatible.
apache-beam 2.34.0 requires dill<0.3.2,>=0.3.1.1, but you have dill 0.3.4 which is incompatible.
apache-beam 2.34.0 requires httplib2<0.20.0,>=0.8, but you have httplib2 0.20.2 which is incompatible.
apache-beam 2.34.0 requires pyarrow<6.0.0,>=0.15.1, but you have pyarrow 6.0.1 which is incompatible.
aioitertools 0.10.0 requires typing_extensions>=4.0; python_version < "3.10", but you have typing-extensions 3.10.0.2 which is incompatible.
aiobotocore 2.1.2 requires botocore<1.23.25,>=1.23.24, but you have botocore 1.24.20 which is incompatible.

Now, I can get past this by adding --use-deprecated=legacy-resolver to the install command. But then I get at this cell:

urls = search_images('bird photos', max_images=1)
urls[0]
HTTPStatusError: Client error '403 Forbidden' for url 'https://duckduckgo.com/i.js?l=wt-wt&o=json&s=0&q=bird%20photos&vqd=4-120680293925849152533489004207253211299&f=%2C%2C%2C%2C%2C&p=1'
For more information check: https://httpstatuses.com/403

Now, I’ve searched on this forum about this error and there is a thread where people say it’s a problem is the amount of max images, but here it is only 1 image. It also might be because the kernel of this notebook uses an old version of the ddg api which is no longer supported(?).

Speaking of which, while trying to set this up locally, I noticed that ‘ddg_images’ doesn’t exist in the newest version of the ddg api and needs to be replaced with ‘DDGS’ which is another rabbit hole because it changes some method syntax…

So after spending a couple of hours messing with this both on kaggle and locally, my question is: Is there a correct quickstart approach for starting this course in 2024? Or do I need to work through all of these bugs one by one, changing dependencies, trying different search APIs, etc?

Oh, and @eulerbug , there’s a separate thread for local setup.

Hi all,

I am just starting with the ‘is it a bird?’ lesson and having an issue when running the code.

is it a case of updating python?

thanks

lol, I just mentioned this in my post right above yours.

Lol… amazing!

Really wanna get stuck in with the projects but having the same issues

1 Like

Yeah, it’s probably possible if we work through each error one-by-one, but it seems odd that there’s not a 2024 quickstart guide from someone already.

Have you already seen this post in the Lesson 1 forum? Lesson 1 official topic - #623 by altcee
They suggested a solution there.

Yes that would be great and maybe use the forums to highlight the errors? However I might have not be as quick to find them :wink:

Yes. thank you, ddg api needs to be replaced with DDGS

OlegK’s copy works well: Lesson 1 official topic - Part 1 2022 - fast.ai Course Forums

Apparently, you need the method from the fastai library and not directly from DDG. He installs both in his copy, but it still worked when I uninstalled duckduckgo_search, so it seems to be a standalone version of the api built into fastai.

Your a legend Thanks so much finally getting some resluts.