Dvc: GDrive remotes not working (missing pydrive) [MacOS]

Created on 24 Jan 2020  ยท  17Comments  ยท  Source: iterative/dvc

$ dvc version     
DVC version: 0.82.2
Python version: 3.7.6
Platform: Darwin-19.0.0-x86_64-i386-64bit
Binary: False
Package: brew
Cache: reflink - supported, hardlink - supported, symlink - supported

$ dvc push        
ERROR: failed to push data to the cloud - URL 'gdrive://root' is supported but requires these missing dependencies: ['pydrive2']. If you have installed dvc using pip, choose one of these options to proceed: 

    1) Install specific missing dependencies:
        pip install pydrive2
    2) Install dvc package that includes those missing dependencies: 
        pip install 'dvc[gdrive]'
    3) Install dvc package with all possible dependencies included: 
        pip install 'dvc[all]'

If you have installed dvc from a binary package and you are still seeing this message, please report it to us using https://github.com/iterative/dvc/issues. Thank you!


Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!

P.s. is there a typical reason why DVC command outputs have extra blank spaces? I also saw some when configuring the gdrive remote with dvc remote modify

awaiting response bug

Most helpful comment

@jorgeorpinel it seems that pydrive2 package still is not available from the same Python environment you are running dvc from.

All 17 comments

p.s. tried sudo pip3 install pydrive2 which successfully installed pydrive in my global Python env (Python3, also installed with brew โ€“ base for my dvc cmd I assume) but I get the same error.

OK... I just tried pip install dvc[gdrive] inside a virtualenv and using that local DVC I also get the same error ๐Ÿ™.

p.s. This is all inside a test --no-scm DVC project with a single data.txt file added to cache.

pip install dvc[all] also didn't help.

pip install pydrive2 in my venv also didn't help ๐Ÿ˜ข

So there's no workaround, it seems.

Another note: This is in the context of this new GDrive guide we're writing. Maybe something is wrong in there? Would be nice for someone in @iterative/engineering to check it out anyway, actually: https://dvc-landing-917-bpsydzzb1cchrh.herokuapp.com/doc/user-guide/setup-google-drive-remote

Per that guide (originally provided by @MaxRis), I created the project, got client ID and client secret, and added/configured the remote like:

$ dvc remote add -d gdroot gdrive://root
$ dvc remote modify gdroot gdrive_client_id ...
$ dvc remote modify gdroot gdrive_client_secret ...

Thanks

@jorgeorpinel it seems that pydrive2 package still is not available from the same Python environment you are running dvc from.

@jorgeorpinel Well, but your package is coming from brew, so no wonder pip installs don't; work ๐Ÿ™‚ Looks like we've forgotten to include pydrive into the brew package, will send a patch ASAP. For now, uninstall from brew and install dvc from pip and it should start working ๐Ÿ™‚

@jorgeorpinel Sent a PR https://github.com/Homebrew/homebrew-core/pull/49361 . Thanks a lot for the feedback!

P.s. is there a typical reason why DVC command outputs have extra blank spaces? I also saw some when configuring the gdrive remote with dvc remote modify

The one over "having troubles"? It is a known issue, just didn't get to it yet. Or do you mean others too?

I'm getting ERROR: pydrive2 1.4.1 has requirement httplib2<=0.15.0, but you'll have httplib2 0.17.0 which is incompatible. for pip install dvc[all]` :( trying to figure out what I did wrong ...

So, brew and pip are both broken I think.

@shcheklein The issue is the todays change in PyDrive2 ๐Ÿ™‚ Looks like we need to fix it without freezing httplib's version.

@efiop yes, I know that the problem was caused by that change ... trying to understand why first.

https://github.com/httplib2/httplib2/releases/tag/v0.17.0 - this might be relevant, ๐Ÿ‘€

For the record: ^ fixed in 0.82.3

Brew patch was merged as well, it now includes gdrive support. @jorgeorpinel closing this for now, please feel free to reopen if we've missed something.

but your package is coming from brew, so no wonder pip installs don't

Makes sense. I don't remember if I tried uninstalling with brew before workarounds. Oh well

Sent a PR Homebrew/homebrew-core#49361
Brew patch was merged as well, it now includes gdrive support

Sweet, thanks Ruslan. Haven't gotten back to testing GDrive stuff but will let you know if I have any other troubles. And OK about the known issue of extra blank lines.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TezRomacH picture TezRomacH  ยท  3Comments

ghost picture ghost  ยท  3Comments

tc-ying picture tc-ying  ยท  3Comments

dnabanita7 picture dnabanita7  ยท  3Comments

mfrata picture mfrata  ยท  3Comments