我試圖導入的BigQuery到我的Python應用程序from google.cloud import bigquery
與dev_appserver.py本地運行它,但我收到一個錯誤:錯誤導入谷歌雲BigQuery API進行模塊在Python應用程序
File "/Volumes/Budhi/Users/anjas/Projects/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/Volumes/Budhi/Users/anjas/Projects/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/Volumes/Budhi/Users/anjas/Projects/google-cloud-sdk/platform/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/Volumes/Budhi/Users/anjas/Projects/wordworks/urlworker/main.py", line 9, in <module>
from google.cloud import bigquery
File "/Volumes/Budhi/Users/anjas/Projects/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/python/sandbox.py", line 999, in load_module
raise ImportError('No module named %s' % fullname)
ImportError: No module named google.cloud.bigquery
我已經安裝的BigQuery與點的庫:
pip install --upgrade google-cloud-bigquery
此外,我已經嘗試安裝它作爲3D方庫到lib目錄中沒有結果。
雖然它的工作原理,當我試圖從Python Shell中導入的BigQuery lib目錄下:
Python 2.7.10 (default, Jul 30 2016, 18:31:42)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from google.cloud import bigquery
>>>
更新:
看來,安裝項目/ lib目錄/文件夾 「谷歌」 模塊與衝突「 google「模塊在google-cloud-sdk/platform/google_appengine中。
當試圖做
from google.cloud import bigquery
Python將內部谷歌雲-SDK /平臺模塊/ google_appengine /谷歌內部沒有項目/ lib中/谷歌/雲
任何想法?
沒有安裝存在於項目的根在你的lib文件夾中的圖書館嗎? –
當然,我已經嘗試安裝一些其他庫像燒瓶,並沒有問題導入他們 –
我有這個相同的問題。我所有其他安裝的供應商庫工作正常。 bigquery但是我不能導入本地或遠程。我已經遵循了我能找到的所有解決方案,但都沒有成功 – Halsafar