2016-02-19 75 views
2

我試圖在本地機器上啓動並運行Google應用,但是在運行安裝腳本時遇到了問題。腳本錯誤,並告訴我,有沒有模塊時,似乎在谷歌雲-SDK被打破....ImportError:沒有名爲時間的模塊

事情我已經嘗試:

  1. 導入時間在Python(它的工作原理)
  2. 嘗試這個無濟於事:https://apple.stackexchange.com/questions/96308/python-installation-messed-up

    Traceback (most recent call last): 
        File "/Users/kennethryan/Projects/go-edu-store/y/google-cloud-sdk/platform/google_appengine/_python_runtime.py", line 83, in <module> 
    _run_file(__file__, globals()) 
        File "/Users/kennethryan/Projects/go-edu-store/y/google-cloud-sdk/platform/google_appengine/_python_runtime.py", line 79, in _run_file 
    execfile(_PATHS.script_file(script_name), globals_) 
        File "/Users/kennethryan/Projects/go-edu-store/y/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime.py", line 175, in <module> 
    main() 
        File "/Users/kennethryan/Projects/go-edu-store/y/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/runtime.py", line 155, in main 
    sandbox.enable_sandbox(config) 
        File "/Users/kennethryan/Projects/go-edu-store/y/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/sandbox.py", line 183, in enable_sandbox 
    __import__('%s.threading' % dist27.__name__) 
        File "/Users/kennethryan/Projects/go-edu-store/y/google-cloud-sdk/platform/google_appengine/google/appengine/dist27/threading.py", line 13, in <module> 
    from time import time as _time, sleep as _sleep 
        File "/Users/kennethryan/Projects/go-edu-store/y/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/sandbox.py", line 984, in load_module 
    raise ImportError('No module named %s' % fullname) 
        ImportError: No module named time 
    

這是我目前的$ PATH:

/Users/kennethryan/Projects/go-edu-store/y/google-cloud-sdk/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 
+1

請問您可以顯示代碼嗎? –

回答

1

看到,因爲這是無效歲的問題,我們可以假設,運行「gcloud components update」更新谷歌的雲工具來其最新版本將解決這個問題。

還要確保您使用的是由GCloud提供的Python安裝,並且沒有衝突的「CLOUDSDK_PYTHON」環境變量應該阻止這種情況發生。


如果這個問題在未來再次看到,建議直接報告給Google Public Issue Tracker因此,這是可以妥善處理和被分流到GCloud工程團隊。

相關問題