Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting Error While Google Cloud CLI installation - No module named 'oauthlib.oauth2

I'm trying to install Google Cloud CLI in my MacBook pro (M1). I have downloaded the M1 version of gCLI SDK for installation.

A bit about my environment:

  • python version 3.9.5 (environment managed by pyenv)
  • currently installed oauthlib version oauthlib==3.2.2

Here's the error I'm getting:

ModuleNotFoundError: No module named 'oauthlib.oauth2' during gCLI Installation

I've also tried installing python-oauth2 to resolve the problem, but no luck. Any pointers will be highly appreciated. Thanks!

like image 685
Ph03nIX Avatar asked May 17 '26 09:05

Ph03nIX


1 Answers

Here's a workaround to install google-cloud-sdk in Mac to avoid the errors in the post:

  • Enter the following at a command prompt: curl https://sdk.cloud.google.com | bash
  • Restart your shell: exec -l $SHELL
  • Run gcloud init to initialize the gcloud environment
like image 163
Ph03nIX Avatar answered May 18 '26 22:05

Ph03nIX



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!