Why does “pip install google.cloud” not enable bigquery?

心不动则不痛 提交于 2020-08-10 05:52:07

问题


We are trying to get the following command to work from this python example for loading a CSV file into BigQuery from Google Cloud Storage:

 from google.cloud import bigquery

But after doing pip install google.cloud we receive the following error when we try to run that command:

ImportError: cannot import name bigquery

If we installed google.cloud - shouldn't bigquery be included? What are missing?

We are running Python 2.7.


回答1:


It looks like installing google-cloud may once have behaved as you expect, but no longer does:

WARNING: The google-cloud Python package is deprecated. On June 18, 2018, this package will no longer install any other packages. Please install the product-specific google-cloud-* packages needed for your application.

The documentation now says that the Python BigQuery client library is called google-cloud-bigquery. Try installing that instead.



来源:https://stackoverflow.com/questions/53017778/why-does-pip-install-google-cloud-not-enable-bigquery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!