fastai / course22-web

Website for Practical Deep Learning for Coders 2022
https://course.fast.ai
Apache License 2.0
43 stars 24 forks source link

Examples dont work with current python/ksggle #24

Open oolon9 opened 6 months ago

oolon9 commented 6 months ago

Doing the bird sample from lesson 1 (on kaggle), at the stage where it's installing fastai , I get this: 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. 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. 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. I've tried pre-installing some packages, and downgrading other packages, but whatever I try just gives a longer list of errors.

Henesys commented 6 months ago

Check out the comments of the original Kaggle notebook, it has some tips on how to debug issues with the environment setup.

image

akshat1 commented 5 months ago

Tried the suggestions, and it did resolve some of the install issues. Unfortunately, apache-beam is still causing errors during install (but it looks like we can ignore those).

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.
apache-beam 2.46.0 requires dill<0.3.2,>=0.3.1.1, but you have dill 0.3.8 which is incompatible.
apache-beam 2.46.0 requires numpy<1.25.0,>=1.14.3, but you have numpy 1.26.4 which is incompatible.
apache-beam 2.46.0 requires pyarrow<10.0.0,>=3.0.0, but you have pyarrow 15.0.2 which is incompatible.

Also, I found that I needed to call DDGS().images (as opposed to DDGS.images).

from duckduckgo_search import DDGS
from fastcore.all import *

def search_images(term, max_images=30):
    print(f"Searching for '{term}'")
    # return L(ddg_images(term, max_results=max_images)).itemgot('image')
    return L(DDGS().images(keywords=term, max_results=max_images)).itemgot('image')