升级gcloud之后,突然出现此错误:
endpointscfg.py get_discovery_doc -f rest
service_backend.main.PersonService Traceback (most recent call last):
File
"/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/endpointscfg.py",
line 133, in <module>
run_file(__file__, globals()) File "/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/endpointscfg.py",
line 129, in run_file
execfile(_PATHS.script_file(script_name), globals_) File "/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/endpointscfg.py",
line 69, in <module>
from google.appengine.tools.devappserver2 import api_server File "/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/api_server.py",
line 86, in <module>
from google.appengine.tools.devappserver2 import cli_parser File "/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/cli_parser.py",
line 40, in <module>
from google.appengine.tools.devappserver2 import runtime_factories File
"/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/runtime_factories.py", line 21, in <module>
from google.appengine.tools.devappserver2 import custom_runtime File
"/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/custom_runtime.py",
line 26, in <module>
from google.appengine.tools.devappserver2 import http_runtime File
"/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/http_runtime.py",
line 53, in <module>
import portpicker ImportError: No module named portpicker
谁能告诉我如何解决?
最佳答案
因此,我能够重现此错误。因此,我在此处提出了一个可能的解决方法的错误:issue 63260172。
要在进行分类时解决该问题,应全局安装portpicker
:
sudo pip install portpicker
或自制软件的修正:
pip install --user --install-option=“--prefix=” portpicker
关于python - python(应用程序引擎)的端点不会产生发现文档,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44856487/