インストール失敗
公式のページ通りにやっても、
windows10のPCにGoogle Cloud SDKをインストールがうまくいかなかった。
環境:Windows 10 Pro, 64bit
SDK version:229.0.0
原因
1. pythonエンコーディングエラー
-
発生したエラー
UnicodeDecodeError: 'ascii' codec can't decode byte ....
-
解決
- Pythonの初期エンコーディングをasciiからshift-jisに変更すればいいようです。
-
参考
2. バッチファイルで日本語文字のユーザフォルダが読み取れない
-
発生したエラー
Welcome to the Google Cloud SDK!
指定されたパスが見つかりません。 -
解決
- 1. installバッチファイルを開く
- 場所:installフォルダ\google-cloud-sdk\install.bat
- (例):C:\Users(User名)\AppData\Local\Google\Cloud SDK\google-cloud-sdk\install.bat
- 2. 47行目を書き換え
- 修正前
SET CLOUDSDK_PYTHON=%%i
- 修正後:日本語を入れるとエラーが起きたので、相対パスで書きました。
SET CLOUDSDK_PYTHON=".\platform\bundledpython\python.exe"
- 修正前
- 3. install.batの実行
- 1. installバッチファイルを開く
-
参考