Can't run gsutil on Mac Catalina
See original GitHub issueFor some reason, with no changes I’m aware of on my system since I last used gsutil, I can no longer run gsutil on my Mac (running Catalina 10.15.2 (19C57)). Just typing gsutil
at the command line yields the following stack trace. I have updated the Google Cloud SDK to the latest version (277.0.0) with no errors (by running gcloud components update
). I also tried gcloud components reinstall
. I am properly authenticated via gcloud and I can run commands using gcloud
without issue. Any help would be appreciated.
Traceback (most recent call last):
File "/usr/local/google-cloud-sdk/platform/gsutil/gsutil", line 21, in <module>
gsutil.RunMain()
File "/usr/local/google-cloud-sdk/platform/gsutil/gsutil.py", line 123, in RunMain
import gslib.__main__
File "/usr/local/google-cloud-sdk/platform/gsutil/gslib/__main__.py", line 68, in <module>
from google_reauth import reauth_creds
File "/usr/local/google-cloud-sdk/platform/gsutil/third_party/google-reauth-python/google_reauth/reauth_creds.py", line 23, in <module>
from oauth2client import client
File "/usr/local/google-cloud-sdk/platform/gsutil/third_party/oauth2client/oauth2client/client.py", line 45, in <module>
from oauth2client import crypt
File "/usr/local/google-cloud-sdk/platform/gsutil/third_party/oauth2client/oauth2client/crypt.py", line 45, in <module>
from oauth2client import _openssl_crypt
File "/usr/local/google-cloud-sdk/platform/gsutil/third_party/oauth2client/oauth2client/_openssl_crypt.py", line 16, in <module>
from OpenSSL import crypto
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/crypto.py", line 12, in <module>
from cryptography import x509
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cryptography/x509/__init__.py", line 8, in <module>
from cryptography.x509.base import (
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cryptography/x509/base.py", line 16, in <module>
from cryptography.x509.extensions import Extension, ExtensionType
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cryptography/x509/extensions.py", line 24, in <module>
from cryptography.x509.general_name import GeneralName, IPAddress, OtherName
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cryptography/x509/general_name.py", line 16, in <module>
from cryptography.x509.name import Name
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cryptography/x509/name.py", line 28, in <module>
_ASN1_TYPE_TO_ENUM = dict((i.value, i) for i in _ASN1Type)
TypeError: 'type' object is not iterable
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:12
Top Results From Across the Web
gsutil Crashes on macOS Catalina - Super User
After upgrading to Catalina (10.15.1) and upgrading everything installed via homebrew, the gsutil utility crashes whenever it's called.
Read more >Install gsutil | Cloud Storage
This page describes the installation and setup of gsutil, a tool that enables you to access Cloud Storage from the command-line using HTTPS....
Read more >-bash: gcloud: command not found on Mac - Stack Overflow
I had the same issue. A lazy and quick fix for this is to just run: brew install --cask google-cloud-sdk. Found by googling....
Read more >Unable to install Chromium for iOs on MacOs Catalina
~/chromium $ ~/chrome-ios/depot_tools/fetch --no-history ios. Running: gclient root. Running: gclient config --spec 'solutions = [
Read more >How to Fix Automator's "Operation Not Permitted" Error in ...
... error when running an Automator scripts and actions in macOS Catalina. ... script to automate uploading images to Google Cloud Storage.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It works!! Just
export CLOUDSDK_PYTHON=python3
if you have multiple python interpreters installed! 😃 Thanks @dilippedClosing this issue as the problem was because of the
enum
library in python2.7. For python2.7 follow the resolutions discussed here https://github.com/pyca/cryptography/issues/4020. For Python3, this should not be an issue. Feel free to re-open the issue if the problem persists.