2017-08-07 130 views
1

我已經部署在谷歌應用程序Engine.In我的代碼Python代碼,試圖導入firebase_admin,但它顯示了以下錯誤,Python的火力地堡問題上沒有模塊名爲firebase_admin

import firebase_admin 
ImportError: No module named firebase_admin 

hello.py

import firebase_admin 
from firebase_admin import credentials 
from firebase_admin import db 

我想簡單的Python代碼使用終端: hello.py

import firebase_admin 
print firebase_admin 

輸出端子:

~/Desktop$ python hello.py 
<module 'firebase_admin' from '/usr/local/lib/python2.7/dist-packages/firebase_admin/__init__.pyc'> 
+1

您是否安裝了包裝? 'pip install firebase-admin' – Thomas

+0

@ThomasMey是的,我安裝了sudo pip install firebase-admin ...它成功安裝了..但仍然出現這個錯誤... – Ramprasad

+0

@ThomasMey我在我的Linux中使用PyCharm ...是的在本地機器上安裝firebase-admin的任何問題? – Ramprasad

回答

0

更新您的

firebase_admin

到最新版本。這將解決問題。 如果NIT重命名

firebase.py

一些其他的名字......它的工作

只是沒有使用

firebase.py

作爲你的項目的名稱,它會工作

0

首先,確認你的包執行程序的路徑。

enter image description here

其次,Perferences - >項目翻譯,確保包安裝正確的路徑 enter image description here

反正,你應該使用其安裝包enter image description here

正確的python