Colabtools: Not able to install google-drive-ocamlfuse

Created on 18 Sep 2018  路  7Comments  路  Source: googlecolab/colabtools

When I run the following code

!apt-get update -qq 2>&1 > /dev/null
!apt-get install -y -qq software-properties-common python-software-properties module-init-tools
!add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null
!apt-get update -qq 2>&1 > /dev/null
!apt-get -y install -qq google-drive-ocamlfuse fuse

I get this error
Warning: apt-key output should not be parsed (stdout is not a terminal)
E: Unable to locate package google-drive-ocamlfuse

The above code used to work for me previously.

Most helpful comment

An immediately applicable work-around is to use the built-in Drive FUSE client by running the snippet below to mount your Drive files:

from google.colab import drive
drive.mount('/content/drive')

All 7 comments

This seems to be astrada/google-drive-ocamlfuse#492

An immediately applicable work-around is to use the built-in Drive FUSE client by running the snippet below to mount your Drive files:

from google.colab import drive
drive.mount('/content/drive')

Thank you. When I try doing this, there is a 'My Drive' folder created inside 'drive'. Is there any way to avoid this additional folder. I just want to mount everything on '/content/drive'

It's not possible to avoid the 'My Drive' intermediate layer, but you can mount elsewhere and symlink just the contents you want back to /content/gdrive:

import os
from google.colab import drive
drive.mount('/gdrive')
os.symlink('/gdrive/My Drive', '/content/gdrive')
!ls -l /content/gdrive/

An immediately applicable work-around is to use the built-in Drive FUSE client by running the snippet below to mount your Drive files:

from google.colab import drive
drive.mount('/content/drive')

What if I just want to mount a folder from My Drive(not all of it-- too heavy)?

You provide the path to the directory inside the drive to drive.mount().

I just checked, providing path to drive.mount() does not work.

Was this page helpful?
0 / 5 - 0 ratings