Zombie assignement : pip install failed from google drive copy

Hello,

When I run Week 2 Assignment: Zombie Detection (C3W2_Assignment.ipynb): cell

Run the setup script you just wrote

!python -m pip install models/research

OK From colab :
Successfully installed Pillow-9.5.0 PyYAML-5.3 colorama-0.4.6 google-auth-oauthlib-0.4.6 keras-2.8.0 keras-preprocessing-1.1.2 numpy-1.21.5 object-detection-0.1 portalocker-2.7.0 protobuf-3.19.6 sacrebleu-2.3.1 sentencepiece-0.1.99 seqeval-1.2.2 tensorboard-2.8.0 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 tensorflow-2.8.4 tensorflow-addons-0.21.0 tensorflow-datasets-4.9.0 tensorflow-estimator-2.8.0 tensorflow-io-gcs-filesystem-0.24.0 tensorflow-metadata-1.13.0 tensorflow-model-optimization-0.7.3 tensorflow-text-2.8.2 tensorflow_io-0.24.0 tf-models-official-2.8.0 typeguard-2.13.3

KO from google drive copy :

Processing ./models/research
Preparing metadata (setup.py) … done
Collecting tf-models-official==2.8.0 (from object-detection==0.1)
Downloading tf_models_official-2.8.0-py2.py3-none-any.whl (2.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 27.0 MB/s eta 0:00:00
Collecting tensorflow_io==0.24.0 (from object-detection==0.1)
Downloading tensorflow_io-0.24.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (23.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23.4/23.4 MB 56.8 MB/s eta 0:00:00
Collecting numpy==1.21.5 (from object-detection==0.1)
Downloading numpy-1.21.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.9/15.9 MB 67.6 MB/s eta 0:00:00
Collecting tensorflow-io-gcs-filesystem==0.24.0 (from tensorflow_io==0.24.0->object-detection==0.1)
Downloading tensorflow_io_gcs_filesystem-0.24.0-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (2.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 78.0 MB/s eta 0:00:00
Requirement already satisfied: Cython in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (0.29.36)
Requirement already satisfied: Pillow in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (8.4.0)
Requirement already satisfied: gin-config in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (0.5.0)
Requirement already satisfied: google-api-python-client>=1.6.7 in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (2.84.0)
Requirement already satisfied: kaggle>=1.3.9 in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (1.5.15)
Requirement already satisfied: matplotlib in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (3.7.1)
Requirement already satisfied: oauth2client in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (4.1.3)
Requirement already satisfied: opencv-python-headless in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (4.8.0.74)
Requirement already satisfied: pandas>=0.22.0 in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (1.5.3)
Requirement already satisfied: psutil>=5.4.3 in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (5.9.5)
Requirement already satisfied: py-cpuinfo>=3.3.0 in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (9.0.0)
Requirement already satisfied: pycocotools in /usr/local/lib/python3.10/dist-packages (from tf-models-official==2.8.0->object-detection==0.1) (2.0.6)
Collecting pyyaml<6.0,>=5.1 (from tf-models-official==2.8.0->object-detection==0.1)
Downloading PyYAML-5.4.1.tar.gz (175 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 kB 20.2 MB/s eta 0:00:00
Installing build dependencies … done
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.
Getting requirements to build wheel … error
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.

ModuleNotFoundError Traceback (most recent call last)

in <cell line: 3>()
1 ### START CODE HERE (Replace Instances of None with your code) ###
2 # import the label map utility module
----> 3 from object_detection.utils import label_map_util
4
5 # import module for reading and updating configuration files.

START CODE HERE (Replace Instances of None with your code)

import the label map utility module

from object_detection.utils import label_map_util

import module for reading and updating configuration files.

from object_detection.utils import config_util

import module for visualization. use the alias viz_utils

from object_detection.utils import visualization_utils as viz_utils

import module for building the detection model

from object_detection.builders import model_builder

END CODE HERE

import module for utilities in Colab

from object_detection.utils import colab_utils

ModuleNotFoundError: No module named ‘object_detection’

I am stuck, thank you for your help

Best regards,
Thierry

Hi Thierry. Looks like you’re using a slightly older version of the notebook. It should be installing pyyaml v5.3, not v5.4. That’s causing the error. Please re-open it from the classroom to see the changes. Hope this helps.

Thank you Chris
But the only dependencies are :
REQUIRED_PACKAGES = [
‘tf-models-official==2.8.0’,
‘tensorflow_io==0.24.0’,
‘numpy==1.21.5’
]

pyyaml is a transitive dependency, I cannot set its version
what can I do ?

Best regards

Hi Thierry. Have you reopened the lab from the classroom? That should already contain all the necessary changes so you don’t have to do it manually. Just make sure to reset the runtime after the pip installs to reload the modules. There’s a reminder in the notebook to do that as well.