Imports Error
# ask-the-community
f
Hello everyone, Flyte community! I'm new to Flyte, I'm trying to make the examples found in the official repo, such as pima diabetes and house price predictor. I have already done the simple examples, but I have not been able to do these two, since I have a common error, the necessary Python libraries are not being imported. When executing a task (in workflow), I get an error because I do not have the Python library installed I already have all the libraries installed locally. Now, I try to do it manually by running the docker build command. (from the original dockerfile for each example) and I always get the same error I am doing it from the git repo, I have not changed the name or anything of the folders. I work with a Mac OS, I send you what I get when I run the docker build command. ltale@L6DDGQJHP9 house % docker build . [+] Building 9.4s (17/20) docker:desktop-linux => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 1.37kB 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/ubuntu:focal 0.6s => [internal] load build context 1.6s => => transferring context: 6.92MB 1.5s => [ 1/16] FROM docker.io/library/ubuntu:focal@sha256:f5c3e53367f142fab0b49908550bdcdc4fb619d2f61ec1dfa60d26e0d59ac9e7 0.0s => CACHED [ 2/16] WORKDIR /root 0.0s => CACHED [ 3/16] RUN : && apt-get update && apt install -y software-properties-common && add-apt-repository ppa:deadsnakes/ppa 0.0s => CACHED [ 4/16] RUN : && apt-get update && apt-get install -y python3.8 python3-pip python3-venv make build-essential libssl-dev curl vim 0.0s => CACHED [ 5/16] RUN apt-get update && apt-get install -y libsm6 libxext6 libxrender-dev ffmpeg 0.0s => CACHED [ 6/16] RUN pip3 install awscli 0.0s => CACHED [ 7/16] WORKDIR /opt 0.0s => CACHED [ 8/16] RUN curl https://sdk.cloud.google.com > install.sh 0.0s => CACHED [ 9/16] RUN bash /opt/install.sh --install-dir=/opt 0.0s => CACHED [10/16] WORKDIR /root 0.0s => CACHED [11/16] RUN python3 -m venv /opt/venv 0.0s => CACHED [12/16] COPY requirements.txt /root 0.0s => ERROR [13/16] RUN /opt/venv/bin/pip install -r /root/requirements.txt 7.1s ------ > [13/16] RUN /opt/venv/bin/pip install -r /root/requirements.txt: 1.064 Collecting adlfs==2023.10.0 1.548 Downloading adlfs-2023.10.0-py3-none-any.whl (25 kB) 1.625 Collecting aiobotocore==2.5.4 1.699 Downloading aiobotocore-2.5.4-py3-none-any.whl (73 kB) 2.200 Collecting aiohttp==3.9.1 2.280 Downloading aiohttp-3.9.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.3 MB) 2.593 Collecting aioitertools==0.11.0 2.690 Downloading aioitertools-0.11.0-py3-none-any.whl (23 kB) 2.727 Collecting aiosignal==1.3.1 2.807 Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB) 2.840 Collecting annotated-types==0.6.0 2.912 Downloading annotated_types-0.6.0-py3-none-any.whl (12 kB) 2.967 Collecting arrow==1.3.0 3.047 Downloading arrow-1.3.0-py3-none-any.whl (66 kB) 3.092 Collecting asttokens==2.4.1 3.165 Downloading asttokens-2.4.1-py2.py3-none-any.whl (27 kB) 3.214 Collecting attrs==23.1.0 3.294 Downloading attrs-23.1.0-py3-none-any.whl (61 kB) 3.368 Collecting azure-core==1.29.5 3.440 Downloading azure_core-1.29.5-py3-none-any.whl (192 kB) 3.498 Collecting azure-datalake-store==0.0.53 3.566 Downloading azure_datalake_store-0.0.53-py2.py3-none-any.whl (55 kB) 3.617 Collecting azure-identity==1.15.0 3.711 Downloading azure_identity-1.15.0-py3-none-any.whl (164 kB) 3.793 Collecting azure-storage-blob==12.19.0 3.879 Downloading azure_storage_blob-12.19.0-py3-none-any.whl (394 kB) 3.967 Collecting binaryornot==0.4.4 4.069 Downloading binaryornot-0.4.4-py2.py3-none-any.whl (9.0 kB) 4.546 Collecting botocore==1.31.17 4.643 Downloading botocore-1.31.17-py3-none-any.whl (11.1 MB) 5.726 Collecting cachetools==5.3.2 5.795 Downloading cachetools-5.3.2-py3-none-any.whl (9.3 kB) 5.844 Collecting certifi==2023.11.17 5.930 Downloading certifi-2023.11.17-py3-none-any.whl (162 kB) 6.088 Collecting cffi==1.16.0 6.162 Downloading cffi-1.16.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (446 kB) 6.236 Collecting chardet==5.2.0 6.305 Downloading chardet-5.2.0-py3-none-any.whl (199 kB) 6.448 Collecting charset-normalizer==3.3.2 6.528 Downloading charset_normalizer-3.3.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (137 kB) 6.575 Collecting click==8.1.7 6.646 Downloading click-8.1.7-py3-none-any.whl (97 kB) 6.692 Collecting cloudpickle==3.0.0 6.783 Downloading cloudpickle-3.0.0-py3-none-any.whl (20 kB) 6.811 Collecting comm==0.2.0 6.894 Downloading comm-0.2.0-py3-none-any.whl (7.0 kB) 7.000 ERROR: Could not find a version that satisfies the requirement contourpy==1.2.0 (from -r /root/requirements.txt (line 69)) (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.1.0, 1.1.1rc1, 1.1.1) 7.060 ERROR: No matching distribution found for contourpy==1.2.0 (from -r /root/requirements.txt (line 69)) ------ Dockerfile:37 -------------------- 35 | # Install Python dependencies 36 | COPY requirements.txt /root 37 | >>> RUN ${VENV}/bin/pip install -r /root/requirements.txt 38 | 39 | # Copy the actual code -------------------- ERROR: failed to solve: process "/bin/sh -c ${VENV}/bin/pip install -r /root/requirements.txt" did not complete successfully: exit code: 1 ltale@L6DDGQJHP9 house %