2017-01-19 5 views
0

Alle gcloud Befehle plötzlich diesen Fehler geben:gcloud Befehl funktioniert plötzlich nicht mehr auf allen

ERROR: gcloud failed to load: No module named google.appengine.ext

This usually indicates corruption in your gcloud installation or problems with your Python interpreter.

Please verify that the following is the path to a working Python 2.7 executable: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 executable.

If you are still experiencing problems, please reinstall the Cloud SDK using the instructions here: https://cloud.google.com/sdk/

Hier sind einige relevante Details und Dinge, die ich versucht habe:

  • Mac 10.11.6
  • Python 2.7.8 auf /Library/Frameworks/Python.framework/Versions/2.7/bin/python
  • Python funktioniert anders
  • ich völlig Google-Cloud-sdk entfernt und redownloaded von https://cloud.google.com/sdk/
  • Versuchte Neustart
  • Tried "export CLOUDSDK_PYTHON =/Library/Frameworks/Python.framework/Versions/2.7/bin/python", aber es hat nicht geholfen. Auch diese Zeile zu meinem .bash_profile hinzugefügt

Wer sonst dieses Problem oder kann eine Lösung vorschlagen?

Ich habe einen Fix unten, aber ich werde glücklich die Antwort an jeden vergeben, der erklären kann, was vor sich geht.

Antwort

0

habe ich herausgefunden, was das Problem verursacht wurde, obwohl ich verstehe nicht, was los ist ... Wenn gcloud Neuinstallation ich das Skript installieren übersprungen (./google-cloud-sdk/install.sh), da es ein optionaler Schritt ist und ich hatte bereits die benötigten Leitungen in meinem Bash Profil.

Wenn dieses Skript ausgeführt wird, jedoch habe ich diesen Fehler:

$ ./google-cloud-sdk/install.sh 
Welcome to the Google Cloud SDK! 
Traceback (most recent call last): 
    File "/Users/.../google-cloud-sdk/bin/bootstrapping/install.py", line 8, in <module> 
    import bootstrapping 
    File "/Users/.../google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 17, in <module> 
    import oauth2client.contrib.gce as gce 
    File "/Users/.../google-cloud-sdk/lib/third_party/oauth2client/contrib/gce.py", line 23, in <module> 
    import httplib2 
    File "/Users/.../google-cloud-sdk/lib/third_party/httplib2/__init__.py", line 29, in <module> 
    import email 
    File "/Users/.../GIT/GAE_Project/email.py", line 1, in <module> 
ImportError: No module named google.appengine.ext 

Eine Datei, die ich vor kurzem in meinem GAE Projekt email.py brach gcloud namens erstellt!?! Umbenennen dieser Datei behoben gcloud.

Das ist mein PYTHONPATH:

/Users/.../google-cloud-sdk/platform/google_appengine:/Users/.../GIT/GAE_Project 

Also auch wenn die Google-Cloud-Bibliotheken kommen, bevor mein GAE Projekt in meiner PYTHONPATH, eine Datei in meinem GAE Projekt brach gcloud.

Verwandte Themen