我尝试在我的本地计算机上启动并运行Google应用程序,但是,在运行安装脚本时遇到问题。该脚本出错并告诉我没有模块时间,似乎在google-cloud-sdk中破解....
我尝试的事情:
尝试这一点无济于事: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
答案 0 :(得分:2)
由于这是一个不活跃的问题,我们可以假设通过运行&#39; gcloud components update
&#39;将Google云端工具更新为最新版本。会解决这个问题。
同时确保您使用GCloud提供的Python安装,并确保没有冲突的CLOUDSDK_PYTHON&#39;环境变量应该阻止这种情况。
如果将来再次出现此问题,建议您直接向Google Public Issue Tracker报告此问题,以便可以正确处理并分配给GCloud工程团队。
答案 1 :(得分:0)
就我而言,我通过设置
export PYTHONPATH=$PYTHONPATH:/usr/lib64/python2.7/lib-dynload/
文件所在的timemodule.so
。