Skip to content

Cannot install google-cloud-sdk or gcloud-cli #241514

@jamescnowell

Description

@jamescnowell

Verification

Description of issue

Installing gcloud-cli or google-cloud-sdk fails because it's directly looking for a python3 binary rather than the python binary.

Can work around with ln /opt/homebrew/opt/python@3.13/libexec/bin/python /opt/homebrew/opt/python@3.13/libexec/bin/python3

Command that failed

brew install --cask google-cloud-sdk

Output of command with --verbose --debug

==> Caveats
To use additional binary components installed via gcloud, add the "/opt/homebrew/share/google-cloud-sdk/bin"
directory to your PATH environment variable, e.g., (for Bash shell):
   export PATH=/opt/homebrew/share/google-cloud-sdk/bin:"$PATH"

==> Downloading https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-550.0.0-darwin-arm.tar.gz
Already downloaded: /Users/james.nowell/Library/Caches/Homebrew/downloads/2ed2c95ea0caea277ba96574bd0a34bb1bb827043b0d724a5a002061e9b2e074--google-cloud-cli-550.0.0-darwin-arm.tar.gz
All dependencies satisfied.
==> Installing Cask gcloud-cli
==> Running installer script 'google-cloud-sdk/install.sh'
Welcome to the Google Cloud CLI!

All components are up to date.

This will install all the core command line tools necessary for working with
the Google Cloud Platform.

==> Source [/opt/homebrew/share/google-cloud-sdk/completion.zsh.inc] in your profile to enable shell command completion for gcloud.
==> Source [/opt/homebrew/share/google-cloud-sdk/path.zsh.inc] in your profile to add the Google Cloud SDK command line tools to your $PATH.

For more information on how to get started, please visit:
  https://cloud.google.com/sdk/docs/quickstarts


==> Linking Bash Completion 'completion.bash.inc' to '/opt/homebrew/etc/bash_completion.d/google-cloud-sdk'
==> Linking Zsh Completion 'completion.zsh.inc' to '/opt/homebrew/share/zsh/site-functions/_google_cloud_sdk'
==> Linking Binary 'gsutil' to '/opt/homebrew/bin/gsutil'
==> Linking Binary 'bq' to '/opt/homebrew/bin/bq'
==> Linking Binary 'docker-credential-gcloud' to '/opt/homebrew/bin/docker-credential-gcloud'
==> Linking Binary 'gcloud' to '/opt/homebrew/bin/gcloud'
==> Linking Binary 'git-credential-gcloud.sh' to '/opt/homebrew/bin/git-credential-gcloud'
deleting existing virtual env before enabling virtual env with current Python version
WARNING:  Python 3.9 will be deprecated on January 27th, 2026. Please use Python version 3.10 and up.
To reinstall gcloud, run:
    $ gcloud components reinstall

This will also prompt to install a compatible version of Python.

If you have a compatible Python interpreter installed, you can use it by setting
the CLOUDSDK_PYTHON environment variable to point to it.

WARNING:  Python 3.9 will be deprecated on January 27th, 2026. Please use Python version 3.10 and up.
To reinstall gcloud, run:
    $ gcloud components reinstall

This will also prompt to install a compatible version of Python.

If you have a compatible Python interpreter installed, you can use it by setting
the CLOUDSDK_PYTHON environment variable to point to it.

Creating virtualenv...
ERROR: (gcloud.config.virtualenv.create) /opt/homebrew/opt/python@3.13/libexec/bin/python3: command not found
==> Unlinking Binary '/opt/homebrew/bin/git-credential-gcloud'
==> Unlinking Binary '/opt/homebrew/bin/gcloud'
==> Unlinking Binary '/opt/homebrew/bin/docker-credential-gcloud'
==> Unlinking Binary '/opt/homebrew/bin/bq'
==> Unlinking Binary '/opt/homebrew/bin/gsutil'
==> Unlinking Zsh Completion '/opt/homebrew/share/zsh/site-functions/_google_cloud_sdk'
==> Unlinking Bash Completion '/opt/homebrew/etc/bash_completion.d/google-cloud-sdk'
==> Purging files for version 550.0.0 of Cask gcloud-cli
Error: Failure while executing; `/usr/bin/env /opt/homebrew/share/google-cloud-sdk/bin/gcloud config virtualenv create --python-to-use /opt/homebrew/opt/python@3.13/libexec/bin/python3` exited with 1. Here's the output:
WARNING:  Python 3.9 will be deprecated on January 27th, 2026. Please use Python version 3.10 and up.
To reinstall gcloud, run:
    $ gcloud components reinstall

This will also prompt to install a compatible version of Python.

If you have a compatible Python interpreter installed, you can use it by setting
the CLOUDSDK_PYTHON environment variable to point to it.

Creating virtualenv...
ERROR: (gcloud.config.virtualenv.create) /opt/homebrew/opt/python@3.13/libexec/bin/python3: command not found

Output of brew doctor and brew config

brew doctor                                                                                                                                                            ✔  12:34:05
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed casks are deprecated or disabled.
You should find replacements for the following casks:
  codux
  diffmerge
  remarkable

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  terraform

brew config                                                                                                                                                        INT ✘  12:35:13
HOMEBREW_VERSION: 5.0.6
ORIGIN: https://github.com/Homebrew/brew
HEAD: d28a8210ba87786bd2553a1d1d410c40ebd18c9f
Last commit: 2 days ago
Branch: stable
Core tap JSON: 18 Dec 18:30 UTC
Core cask tap JSON: 18 Dec 18:30 UTC
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_DOWNLOAD_CONCURRENCY: 24
HOMEBREW_EDITOR: emacs -nw
HOMEBREW_FORBID_PACKAGES_FROM_PATHS: set
HOMEBREW_MAKE_JOBS: 12
HOMEBREW_NO_ANALYTICS: set
Homebrew Ruby: 3.4.7 => /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.4.7/bin/ruby
CPU: dodeca-core 64-bit arm_brava
Clang: 17.0.0 build 1700
Git: 2.49.0 => /opt/homebrew/bin/git
Curl: 8.7.1 => /usr/bin/curl
macOS: 15.7.2-arm64
CLT: 26.1.0.0.1.1761104275
Xcode: N/A
Rosetta 2: false

Output of brew tap

brew tap                                                                                                                                                               ✔  12:35:56
auth0/auth0-cli

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions