我是新來使用應用服務引擎和Python,我想不通爲什麼我不斷收到錯誤:ImportError: No module named tweepy
導入錯誤,「無模塊命名tweepy」 - 谷歌的AppEngine
我把pip install tweepy==3.3.0
到我的終端它說它是成功的。但是,它仍然表示無法找到該模塊。
我必須把它放到特定的文件夾嗎?如果是這樣,哪一個/我應該怎麼做?
更新:當我鍵入PIP顯示列表tweepy (3.3.0)
,但導入錯誤仍然存在
而且,我不知道這事,但我使用的Atom和MAC。在我的電腦,我想我有蟒蛇(3.6和2.7)
注意的兩個版本:當我現在pip install tweepy==3.3.0
類型,所有它說的是: Requirement already satisfied: tweepy==3.3.0 in /Library/Python/2.7/site-packages Requirement already satisfied: six>=1.7.3 in /Library/Python/2.7/site-packages (from tweepy==3.3.0) Requirement already satisfied: requests-oauthlib>=0.4.1 in /Library/Python/2.7/site-packages (from tweepy==3.3.0) Requirement already satisfied: requests>=2.4.3 in /Library/Python/2.7/site-packages (from tweepy==3.3.0) Requirement already satisfied: oauthlib>=0.6.2 in /Library/Python/2.7/site-packages (from requests-oauthlib>=0.4.1->tweepy==3.3.0) Requirement already satisfied: idna<2.6,>=2.5 in /Library/Python/2.7/site-packages (from requests>=2.4.3->tweepy==3.3.0) Requirement already satisfied: certifi>=2017.4.17 in /Library/Python/2.7/site-packages (from requests>=2.4.3->tweepy==3.3.0) Requirement already satisfied: urllib3<1.23,>=1.21.1 in /Library/Python/2.7/site-packages (from requests>=2.4.3->tweepy==3.3.0) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Python/2.7/site-packages (from requests>=2.4.3->tweepy==3.3.0)
更新:我也試圖導入神社並獲取導入錯誤
所以你想知道爲什麼AppEngine無法看到你已經在本地安裝到你的電腦的模塊? – cowbert
是的,爲什麼我的main.py文件找不到模塊?我是否必須像使用庫一樣向app.yaml添加內容? – Wes
你在'app.yaml'的'runtime'中指定了哪個python?如果是python27,則需要確保使用python27的pip。您可以使用'pythonNN -m pip'來調用正確版本的pip。其中'NN'是版本(3x或27) – cowbert