How to install gcp in Python?

0 votes

There are a lot of BigQuery examples having 

import gcp.bigquery as bigQ

I'm getting an error ImportError: No module named gcp.bigquery while running this.

Is there any way to install this library?  I couldn't get any help from the documentation.

May 10, 2018 in GCP by Data_Nerd
• 2,350 points
82 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

This might work

$ pip install --upgrade google-api-python-client
answered May 10, 2018 by shams
• 3,580 points
0 votes

If you're accessing BigQuery in python, you can do that using the gcloud library.

First, install the gcloud library:

$ pip install --upgrade gcloud

Then, after setting up your auth and project info, you can make api calls in python like this (adapted from the gcloud-python docs):

from gcloud import bigquery

client = bigquery.Client()
datasets, next_page_token = client.list_datasets()
print([dataset.name for dataset in datasets])

(As someone mentioned previously, you can also do it using the google-api-python-client.)

License: Apache 2

answered Aug 20, 2018 by Priyaj
• 56,140 points

Related Questions In GCP

+2 votes
2 answers

How to download multiple files in Google Cloud Storage?

You can achieve this through the gsutil ...READ MORE

answered May 9, 2018 in GCP by kurt_cobain
• 9,240 points
2,671 views
0 votes
2 answers

How to transfer google cloud project ownership?

Go to IAM and Admin Then Select IAM Click Add Provide another user's ...READ MORE

answered Aug 20, 2018 in GCP by Priyaj
• 56,140 points
490 views
0 votes
1 answer

How to open a port on google compute engine

You need to change the local TCP ...READ MORE

answered May 9, 2018 in GCP by kurt_cobain
• 9,240 points
46 views
0 votes
1 answer

Changing Machine Instance on GCP

There is no direct method to change ...READ MORE

answered Aug 1, 2018 in GCP by kurt_cobain
• 9,240 points
31 views
0 votes
2 answers
0 votes
1 answer

How to delete a project from Google Cloud Console

First of all, select the project you ...READ MORE

answered Apr 18, 2018 in GCP by kurt_cobain
• 9,240 points
100 views
+3 votes
11 answers

How do I delete my Google Cloud Platform Account?

How do I delete me cloud and ...READ MORE

answered Jan 18 in GCP by dodge123@yahoo.com
9,317 views
0 votes
2 answers

Google Cloud datastore vs firebase

Google has already made a guide for ...READ MORE

answered Aug 20, 2018 in GCP by Priyaj
• 56,140 points
132 views
0 votes
1 answer

how to install pandas in python

it is very basic to install pandas if ...READ MORE

answered Mar 6 in Python by Waseem
• 2,830 points
33 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.