GCE上没有名为"google.cloud._helpers"的模块 [英] No module named 'google.cloud._helpers' on GCE

查看:124
本文介绍了GCE上没有名为"google.cloud._helpers"的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在GCE上导入google.cloud.bigquery时出现错误. 它不是在非GCE的环境中发生的. 我用pip执行更新.

I get an error when importing google.cloud.bigquery on GCE. It did not happen in an environment that is not GCE. I executed update with 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以来,它不起作用,我认为我的服务器出了点问题. 我重置了服务器,然后重试.

ModuleNotFoundError: No module named 'google.cloud._helpers'

11/11/2018 add Thank you for answering. It did not work since creating a new python using pyenv ,I think my server is something wrong. I reset the server and try again.

推荐答案

在2018年6月,Google弃用了google.cloud Python软件包.您需要直接使用pip install --upgrade google-cloud-bigquery而不是pip install --upgrade google-cloud直接使用BigQuery模块.

In June 2018, Google deprecated the google.cloud Python package. You need to directly use the BigQuery module directly by using pip install --upgrade google-cloud-bigquery, not pip install --upgrade google-cloud.

更多信息此处.

这篇关于GCE上没有名为"google.cloud._helpers"的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆