I mounted to Google drive account A. Now I want to switch to account B but I cannot do that, because there is no way for me to enter a new authentication key when executing drive.mount()
.
What I have tried and failed:
force_remount=True
in drive.mount()
, it will only automatically remount account A. Not asking me for new mounting target.How can I:
On both Windows 10 and Windows 11, open Settings (using the Win + I shortcut if you like) and browse to Apps > Apps & features. Use the search box or scroll down to find Google Drive. Click it, followed by Uninstall, then walk through the steps to remove Google Drive from your computer.
How do I delete a directory in Colab? Enter the collaboration. Click My Account > Manage Folders. to collapse it. In the Manage Folder pane, click the name of the parent folder (one level up) of the folder you want to delete.
If you want to change directory from google colab into google drive, connect to google drive first. Change to the google drive directory. Yes, because this answer is slightly outdated. Now the same path should be: '/content/drive/MyDrive/'.
I have found the 'Restart runtime...' not to work, and changing permission too much of a hassle.
Luckily, the drive
module is equipped with just the function you need:
from google.colab import drive drive.flush_and_unmount()
You can reset your Colab backend by selecting the 'Reset all runtimes...' item from the Runtime menu.
Be aware, however, that this will discard your current backend.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With