我在导入时遇到错误google.cloud.bigquery
在普通教育考试上。
它不会发生在非 GCE 的环境中。
我执行了更新pip
.
你知道为什么吗?
user1@sv1:~$ python
Python 3.6.0 |Continuum Analytics, Inc.| (default, Dec 23 2016,12:22:00)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from google.cloud import bigquery
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/user1/miniconda3/lib/python3.6/site-packages/google/cloud/bigquery/__init__.py", line 34, in <module>
from google.cloud.bigquery.client import Client
File "/home/user1/miniconda3/lib/python3.6/site-packages/google/cloud/bigquery/client.py", line 32, in <module>
import google.cloud._helpers
ModuleNotFoundError:没有名为“google.cloud._helpers”的模块
2018 年 11 月 11 日 添加
谢谢您的回答。
自从使用 pyenv 创建一个新的 python 以来它就不起作用了,我认为我的服务器出了问题。
我重置服务器并重试。
2018 年 6 月,Google 弃用了google.cloud
Python 包。您需要直接使用 BigQuery 模块pip install --upgrade google-cloud-bigquery
, not pip install --upgrade google-cloud
.
更多信息here https://pypi.org/project/google-cloud/.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)