簡體   English   中英

ImportError:沒有名為appengine.api的模塊

[英]ImportError: No module named appengine.api

我剛剛更新了應用程序引擎,並在運行dev_appserver時更新了它。 在我的項目目錄中,出現以下錯誤。

MacBook-xx-xxx-xxx-xxxx vinay$ dev_appserver.py .
Traceback (most recent call last):
  File "/usr/local/bin/dev_appserver.py", line 84, in <module>
    _run_file(__file__, globals())
  File "/usr/local/bin/dev_appserver.py", line 80, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 31, in <module>
    from google.appengine.api import appinfo
ImportError: No module named appengine.api

更新

Python 2.7.10 (default, Jul 14 2015, 19:46:27) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import google
>>> print(google)
<module 'google' (built-in)>

我的同事有同樣的問題。 他還安裝了另一個Google軟件包,即protobuf。

如果您嘗試print(google.__path__) ,它可能會說除了Google Appengine路徑以外的其他內容。 或者嘗試使用dir(google)來了解實際導入的內容。

為了解決這個問題,他不得不刪除protobuf。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM