Hi, I am new at Jupyter Notebook/ JupyterLab.
I need to access Google Colab from my local Jupyter Notebook or JupyterLab.
I do not need to connect Google Colab to a local host (I can do it but it is not what I need to solve npw).
Rather I need to be able to type code on my laptop and authenticate to Google.
My set up includes Python 3.9, Jupyter Notebook 6.4.6 and JupyeterLab 3.2.1
I installed google-colab with conda (Google Colab :: Anaconda.org)
I installed pydrive
Then I typed:
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from google.colab import auth
from oauth2client.client import GoogleCredentials
After that:
auth.authenticate_user()
I am able to access successfully to my Google account. Then, I get the following error:
OperationalError Traceback (most recent call last)
/tmp/ipykernel_23123/4149171672.py in
----> 1 auth.authenticate_user()
~/anaconda3/envs/CV_Pytorch/lib/python3.9/site-packages/google/colab/auth.py in authenticate_user(clear_output)
146 with context_manager():
147 _gcloud_login()
→ 148 _install_adc()
149 colab_tpu_addr = _os.environ.get(‘COLAB_TPU_ADDR’, ‘’)
150 if ‘COLAB_SKIP_AUTOMATIC_TPU_AUTH’ not in _os.environ and colab_tpu_addr:
~/anaconda3/envs/CV_Pytorch/lib/python3.9/site-packages/google/colab/auth.py in _install_adc()
106 gcloud_db_path = _os.path.join(
107 _os.environ.get(‘DATALAB_ROOT’, ‘/’), ‘content/.config/credentials.db’)
→ 108 db = _sqlite3.connect(gcloud_db_path)
109 c = db.cursor()
110 ls = list(c.execute(‘SELECT * FROM credentials;’))
OperationalError: unable to open database file
Is there another way to do that?
Please, could you help me?
Thank you