Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve: ModuleNotFoundError: No module named 'google.colab'

Tags:

I want to run the command:

from google.colab import auth

But I am getting this error:

ModuleNotFoundError: No module named 'google.colab'

This is required for accessing files on google drive from python. There is a package google but not module colab in it. How to resolve this error?

like image 728
Ravaging Care Avatar asked Oct 03 '18 06:10

Ravaging Care


People also ask

Do I need to install anything to use Google Colab?

Colab allows you to use and share Jupyter notebooks with others without having to download, install, or run anything.


2 Answers

You can simply download google-colab and use it in local.

pip install google-colab
like image 108
Hazeeb M Avatar answered Sep 18 '22 12:09

Hazeeb M


AFAIK, you can execute the module 'google.colab' from within the notebook environment of colab.research.google.com (it is not a publicly available package)

OFF-TOPIC: Looking at the tag conda in your question. I assume that you are running the code from your local machine. Please make use of PyDrive to read from google drive on your local machine.

References:

  1. Google Colaboratory FAQ
  2. PyDrive
like image 43
Dhruvan Ganesh Avatar answered Sep 21 '22 12:09

Dhruvan Ganesh