Skip to content

setuptools 60.0.0 breaking change #325

Closed
@vpipkt

Description

@vpipkt

install_requires should avoid setuptools>=60 as it results in (apparently) a ModuleNotFound error. We encountered this in GitHub actions calls to gcloud tools.

Environment details

  • OS type and version: Ubuntu (Github Actions ubuntu 2004)
  • Python version: 3.7.12
  • pip version: 20.0.2
  • google-api-core 2.3.2
  • setuptools 60.0.0

Steps to reproduce

  1. pip install google-api-core with eager upgrade strategy
  2. make call to gcloud

Code example

$ pip install --upgrade --upgrade-strategy eager  "google-api-python-client>=1.0.0"
$ gcloud container images list-tags
ERROR: gcloud failed to load (gcloud.container.images.list_tags): Problem loading gcloud.container.images.list_tags: No module named 'setuptools._distutils'.

# then try
$ pip install --upgrade --upgrade-strategy eager  "setuptools<60" "google-api-python-client>=1.0.0"
$ gcloud container images list-tags
ERROR: (gcloud.container.images.list-tags) argument IMAGE_NAME: Must be specified.
# This is the expected result .... 

CLI output in failure case

ERROR: gcloud failed to load (gcloud.container.images.list_tags): Problem loading gcloud.container.images.list_tags: No module named 'setuptools._distutils'.

This usually indicates corruption in your gcloud installation or problems with your Python interpreter.

Please verify that the following is the path to a working Python 2.7 or 3.5+ executable:
    /Users/jason.brown/.virtualenvs/dgx/bin/python3
If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 or 3.5+ executable.

If you are still experiencing problems, please run the following command to reinstall:
    $ gcloud components reinstall

If that command fails, please reinstall the Cloud SDK using the instructions here:
    https://cloud.google.com/sdk/

Metadata

Metadata

Assignees

No one assigned

    Labels

    externalThis issue is blocked on a bug with the actual product.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions