3

Unable to install gcloud sdk using package "google-cloud-sdk-307.0.0-darwin-x86_64.tar.gz" downloaded from gcloud. Supported Python versions are 3.5 to 3.7, and 2.7.9 or higher

Does it mean Python 3.7.4 is not supported?

enter code here

$ python3 -V
Python 3.7.4

$ which -a python3
/usr/local/bin/python3
/usr/bin/python3

$ ./google-cloud-sdk/install.sh
Welcome to the Google Cloud SDK!
Traceback (most recent call last):
  File "/Users/spalani/Documents/DownloadPackages/./google-cloud-sdk/bin/bootstrapping/install.py", line 12, in <module>
    import bootstrapping enter code here
  File "/Users/spalani/Documents/DownloadPackages/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 39, in <module>
    from googlecloudsdk.core import config
  File "/Users/spalani/Documents/DownloadPackages/google-cloud-sdk/lib/googlecloudsdk/core/config.py", line 33, in <module>
    from oauth2client import client
  File "/Users/spalani/Documents/DownloadPackages/google-cloud-sdk/lib/third_party/oauth2client/client.py", line 39, in <module>
    from oauth2client import transport
  File "/Users/spalani/Documents/DownloadPackages/google-cloud-sdk/lib/third_party/oauth2client/transport.py", line 17, in <module>
    import httplib2
  File "/Users/spalani/Documents/DownloadPackages/google-cloud-sdk/lib/third_party/httplib2/__init__.py", line 20, in <module>
    from httplib2.python3.httplib2 import *
  File "/Users/spalani/Documents/DownloadPackages/google-cloud-sdk/lib/third_party/httplib2/python3/httplib2/__init__.py", line 40, in <module>
    import ssl
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 98, in <module>
    import _ssl             # if we can't import it, let the error propagate
ImportError: dlopen(/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_ssl.cpython-37m-darwin.so, 2): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload/_ssl.cpython-37m-darwin.so
  Reason: image not found

1 Answer 1

6

Regarding your question “Does it mean Python 3.7.4 is not supported?” According to this document:

Cloud SDK runs on Linux, macOS, and Windows. Cloud SDK requires Python. Supported versions are 3.5 to 3.7, and 2.7.9 or higher.

So, it seems that it is supported for the Cloud SDK installation.

On the other hand, I have found the following guide to configure the Python interpreter, it could help you to set it properly.

Also, It appears that the recommended option to install SDK on MacOS is through the interactive installer.

For Windows and macOS interactive installations, and all other use cases, run the interactive installer to install the latest release of Cloud SDK.

The steps to install it using the Google Cloud SDK installer are:

  1. Enter the following at a command prompt:

curl https://sdk.cloud.google.com | bash

  1. Restart your shell:

exec -l $SHELL

  1. Run gcloud init to initialize the gcloud environment:

gcloud init

I hope you find this information useful.

2
  • It doesn't solve the problem to me. I suspect the issue is with the OpenSSL version of macOS (mine is v1.1.1); stack-trace returns bootstrapping/install.py, core/config.py, oauth2client/client.py, httplib2/python3/httplib2/__init__.py, /opt/pkg/lib/python3.7/lib-dynload/_ssl.so. Nov 2, 2020 at 3:14
  • 1
    thanks a lot bro! Saves me last two days trouble
    – Ph03nIX
    Nov 22, 2022 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.