I just want to get started.
I downloaded Jupyiter Notebook. It seems to work. What do I do now?
The instructions are too confusing.
I tried to use Collab and when I ran the code that shows a picture of a cat I got this:
Any code I run in the Collab version gives me an error.
Is that supposed to happen?
Thank you
When I emulate the code the instructor writes in the lesson 1 video I immediately get an error. How do I fix this?
I have a local instance of Jupyter notebook.
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
[31 lines of output]
Traceback (most recent call last):
File "C:\Users\william.turner\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\Users\william.turner\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william.turner\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william.turner\AppData\Local\Temp\pip-build-env-obgyd8gq\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william.turner\AppData\Local\Temp\pip-build-env-obgyd8gq\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "C:\Users\william.turner\AppData\Local\Temp\pip-build-env-obgyd8gq\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\william.turner\AppData\Local\Temp\pip-build-env-obgyd8gq\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 126, in <module>
File "C:\Users\william.turner\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 408, in check_call
retcode = call(*popenargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william.turner\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 389, in call
with Popen(*popenargs, **kwargs) as p:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\william.turner\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\william.turner\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1538, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [WinError 2] The system cannot find the file specified
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
Getting requirements to build wheel did not run successfully.
exit code: 1
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
[notice] A new release of pip is available: 23.2.1 -> 23.3.2
[notice] To update, run: python.exe -m pip install --upgrade pip
Hi, enjoying the course so far but having some issues with setup.
The fastsetup repo was changed 2 days ago so that the setup-conda.sh
script installs miniconda3 rather than mambaforge.
I understand that I should now install packages with conda install [package]
rather than mamba install [package]
. This is fine, but when I run that it says it can’t find the package
I decided to try to install fastai with pip instead (which succeeded), but pip (and conda) can’t find fastchan (which the video also says to install at the same time (around 57:40)).
Going to try to press on and see if I can get this working (may uninstall everything and try mambaforge if it’s not working), but would really appreciate any context on the shift from mambaforge to miniconda3 (does mambaforge not work any more?), as well as whether I’m doing something foolish or otherwise going down a useless rabbithole.
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.
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.
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