55763

Google cloud sdk not working when python points python3

I am currently trying to install google cloud sdk on my macbook. I am using scikit-learn and anaconda for machine learning so on my laptop python points to python3.5. However google cloud sdk requires python 2.7 for installation, and that's why I am facing the problem of not be able to install it.

when I ran the install.sh file the error occurred and I have no clue how to deal with it:

Adam | ~ $ git/google-cloud-sdk/install.sh Welcome to the Google Cloud SDK! Traceback (most recent call last): File "/Users/AdamLiu/Git/google-cloud-sdk/lib/third_party/enum/__init__.py", line 364, in __getattr__ return cls._member_map_[name] KeyError: '_convert' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/AdamLiu/git/google-cloud-sdk/bin/bootstrapping/install.py", line 8, in <module> import bootstrapping File "/Users/AdamLiu/Git/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 9, in <module> import setup File "/Users/AdamLiu/Git/google-cloud-sdk/bin/bootstrapping/setup.py", line 34, in <module> from googlecloudsdk.core.util import platforms File "/Users/AdamLiu/Git/google-cloud-sdk/lib/googlecloudsdk/core/util/platforms.py", line 18, in <module> import platform File "/Users/AdamLiu/anaconda/lib/python3.5/platform.py", line 117, in <module> import sys, os, re, subprocess File "/Users/AdamLiu/anaconda/lib/python3.5/subprocess.py", line 364, in <module> import signal File "/Users/AdamLiu/anaconda/lib/python3.5/signal.py", line 8, in <module> _IntEnum._convert( File "/Users/AdamLiu/Git/google-cloud-sdk/lib/third_party/enum/__init__.py", line 366, in __getattr__ raise AttributeError(name) AttributeError: _convert

Super thanks in advance!

Answer1:

Set the CLOUDSDK_PYTHON environment variable to the location of your Python 2.x executable before running install.sh.

Or make sure that you have python2 in your path so that which python2 can find it.

Recommend

  • How do I use categorical_hinge in Keras?
  • java convert to int
  • Keras TypeError: fit() missing 1 required positional argument: 'y'
  • Wsdl Parsing in ios
  • Are grequests responses in the same order as the requests?
  • App works as desired in debug mode but crashes in Rally environment
  • TwitterOAuth from Abraham - Could not authenticate you; Error: 32
  • Antialias on clipPath on layout
  • FOSUserBundle force user to write a different password
  • Is it possible to ask GIT, don't show a file?
  • Does SmartGit support git-svn?
  • How to load Q library with Require.js?
  • How secure are apple APNS push notifications?
  • Many to Many in Linq using Dapper
  • Google analytics measurement protocol session timeout and query time limits
  • How can I prevent the need to copy strings passed to a avr-gcc C++ constructor?
  • How to handle elastic beanstalk deployment so it uploads only changed files
  • Casting between Interfaces and Classes
  • How to install node-mysql?
  • Undefined references when compiling gSOAP client
  • Combining two different ActiveRecord collections into one
  • How can I enlarge video fullscreen without the affected interface project in as3?
  • What and where is mdimport
  • With Hadoop, can I create a tasktracker on a machine that isn't running a datanode?
  • VSO Build — Response status code does not indicate success: 404 (Not Found)
  • why do I get the error when installing the gem 'pg'? [duplicate]
  • Exception “firebase.functions() takes … no argument …” when specifying a region for a Cloud Function
  • Seeking advice on Jetty HttpClient Hang
  • Master page gives error
  • Run Powershell script from inside other Powershell script with dynamic redirection to file
  • Load html files in TinyMce
  • How can I get HTML syntax highlighting in my editor for CakePHP?
  • using HTMLImports.whenReady not working in chrome
  • Hits per day in Google Big Query
  • coudnt use logback because of log4j
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • Linking SubReports Without LinkChild/LinkMaster
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • Android Heatmap on canvas or ImageView