0

module error generated

I enter the code in both google colab and on jupyter notebook (not sure where I am suppose to execute this on as I am following along with a notebook that I have access to) and I get the module error on jupyter notebook and am unable to proceed regardless as it is claiming there is no module named google to import drive from. I tried everything at this link to no avail.

ImportError: No module named 'google'

from google.colab import drive drive.mount('/content/gdrive') import os os.chdir('/content/gdrive/My Drive/UTSPAN/Events/2019-2020 Tutorials/DataScraping')

I don't use stackoverflow often so pardon my ignorance if I am not clear or if more information is needed. Thanks

Just Drew It
  • 7
  • 1
  • 6
  • Please do not share information as images unless absolutely necessary. See: https://meta.stackoverflow.com/questions/303812/discourage-screenshots-of-code-and-or-errors, https://idownvotedbecau.se/imageofcode, https://idownvotedbecau.se/imageofanexception/. – AMC Mar 18 '20 at 23:02

1 Answers1

0

In google colab, if open a new notebook and type

import google

It will work without any additional installation..

Ganesh Chandrasekaran
  • 1,578
  • 12
  • 17
  • It is to eliminate the issue whether the issue is caused by imported Jupyter notebook . – Ganesh Chandrasekaran Mar 18 '20 at 23:15
  • @Brian Unfortunately it's unclear if they get the same error when using Colab, since they write _ enter the code in both google colab and on jupyter notebook_ but then only say _I get the module error on jupyter notebook_. – AMC Mar 18 '20 at 23:42
  • @AMC I see, my mistake. Thank you for the clarification. I've removed my comment. – Brian61354270 Mar 18 '20 at 23:44
  • Thanks for pointing that out. Allow me to add some clarification, I try it on Google Colab and get a different error. The notebook I was following along with was able to enter in the authorization code and proceed in Jupyter Notebook itself so I do not believe that is at issue. I tried importing google as kindly suggested above although that generates the same error. I am open to more ideas of things to try. – Just Drew It Mar 19 '20 at 02:39
  • when you created a new notebook and click "connect" did you choose "connect to hosted run-time" or "local run-time" ? Hosted run time comes pre installed – Ganesh Chandrasekaran Mar 19 '20 at 02:57
  • I presume you mean create a new notebook on colab? I am not prompted to choose hosted or local run-time regardless. – Just Drew It Mar 19 '20 at 03:40
  • Tried running everything on google colab now as I'd be content if I could get around this with that. I am getting: FileNotFoundError: [Errno 2] No such file or directory: '/content/gdrive/My Drive/https://drive.google.com/open?id=19ujabHAPrukOpMZnEp2tqRrLmI0noyit' I got a shareable link for the file directory and it does not seem to be what it's looking for. I know it has something to do with my not routing the csv I am trying to generate with the data scraped although I am unsure what the correct response it. – Just Drew It Mar 19 '20 at 03:40