我嘗試使用谷歌端點V2 下面這個tutorial導入錯誤:沒有模塊名爲google.appengine.ext(雲端點框架V2)
我已經做了所有步驟,直到生成所需的配置文件:步驟
但是,當我嘗試使用以下命令
蟒蛇的lib /端點/ endpointscfg.py get_swagger_spec main.EchoApi --hostname echo-api.endpoints.xxxxxxx.appspot.com
我得到以下警告和錯誤
WARNING: Could not find the fix_sys_path() function in dev_appserver.
If you encounter errors, please make sure that your Google App Engine SDK is up-to-date.
Traceback (most recent call last):
File "lib/endpoints/endpointscfg.py", line 59, in
import _endpointscfg_setup # pylint: disable=unused-import
File "D:\Libraries\Documents\transporter\lib\endpoints_endpointscfg_setup.py", line 107, in
` _SetupPaths()
File "D:\Libraries\Documents\transporter\lib\endpoints_endpointscfg_setup.py", line 103, in _SetupPaths
from google.appengine.ext import vendor
ImportError: No module named google.appengine.ext
,併產生
我重新安裝了一切沒有OpenAPI的配置文件,更新的一切,檢查系統變量,但仍然得到錯誤
PS Windows 7
google.appengine.ext與谷歌雲SDK封裝在App Engine SDK的一部分。你有沒有在你的Python路徑中包含該位置? – HondaGuy
@HondaGuy這就是答案,l更新了我的Python路徑,它工作:)謝謝 –
我沒有足夠的代表評論Tungamirai Mangombe的答案。 對我來說,它添加了:C:\ Program Files(x86)\ Google \ Cloud SDK \ google-cloud-sdk \ platform \ google_appengine \ google \ appengine即與其他:\ google \ appengine回答。修復它。 – SLLegendre