Dvc: Error: google-api-python-client DistributionNotFound when dvc is installed from the .exe file on Windows

Created on 29 May 2020  路  6Comments  路  Source: iterative/dvc

Bug Report

I am trying to use dvc push command to push my data to a gdrive folder, but getting the following error. Also, I have added logs at the end.

pkg_resources.DistributionNotFound: The 'google-api-python-client' distribution was not found and is required by the application

Please provide information about your setup

I am on Windows 10, and installed DVC by running the downloaded executable file from dvc.org website.

Output of dvc version: 0.94.0

Additional Information (if any):

$ dvc push -v


2020-05-29 13:23:11,992 DEBUG: Trying to spawn '['C:\Program Files (x86)\DVC (Data Version Control)\dvc.exe', 'daemon', '-q', 'updater']'
2020-05-29 13:23:17,521 DEBUG: Spawned '['C:\Program Files (x86)\DVC (Data Version Control)\dvc.exe', 'daemon', '-q', 'updater']'
2020-05-29 13:23:17,526 DEBUG: PRAGMA user_version;
2020-05-29 13:23:17,527 DEBUG: fetched: [(3,)]
2020-05-29 13:23:17,527 DEBUG: CREATE TABLE IF NOT EXISTS state (inode INTEGER PRIMARY KEY, mtime TEXT NOT NULL, size TEXT NOT NULL, md5 TEXT NOT NULL, timestamp TEXT NOT NULL)
2020-05-29 13:23:17,528 DEBUG: CREATE TABLE IF NOT EXISTS state_info (count INTEGER)
2020-05-29 13:23:17,529 DEBUG: CREATE TABLE IF NOT EXISTS link_state (path TEXT PRIMARY KEY, inode INTEGER NOT NULL, mtime TEXT NOT NULL)
2020-05-29 13:23:17,530 DEBUG: INSERT OR IGNORE INTO state_info (count) SELECT 0 WHERE NOT EXISTS (SELECT * FROM state_info)
2020-05-29 13:23:17,532 DEBUG: PRAGMA user_version = 3;
2020-05-29 13:23:23,230 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\92\cc4168a1e2bb7630fe3f42180ae792.dir' is unchanged since it is read-only
2020-05-29 13:23:23,231 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\92\cc4168a1e2bb7630fe3f42180ae792.dir' is unchanged since it is read-only
2020-05-29 13:23:23,233 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\6b\39415383ba8bfc212f48d7bb0983f7.dir' is unchanged since it is read-only
2020-05-29 13:23:23,234 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\6b\39415383ba8bfc212f48d7bb0983f7.dir' is unchanged since it is read-only
2020-05-29 13:23:23,245 DEBUG: Preparing to upload data to 'gdrive://*****'
2020-05-29 13:23:23,246 DEBUG: Preparing to collect status from gdrive://
*****
2020-05-29 13:23:23,247 DEBUG: Collecting information from local cache...
2020-05-29 13:23:23,251 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\3a\eae1dab81b9328111b3fb5e9c22c3e' is unchanged since it is read-only
2020-05-29 13:23:23,252 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\ce\a32ec9f982ad8a0f315d1bdd3006be' is unchanged since it is read-only
2020-05-29 13:23:23,256 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\3e\2d64cd42daa604a1f9c57c4b8f2bde' is unchanged since it is read-only
2020-05-29 13:23:23,258 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache0d\899cf8e33b41b01432c25d8b1b3ee6' is unchanged since it is read-only
2020-05-29 13:23:23,260 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\6b\39415383ba8bfc212f48d7bb0983f7.dir' is unchanged since it is read-only
2020-05-29 13:23:23,263 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\66\17830adea23ca5499183274527f392' is unchanged since it is read-only
2020-05-29 13:23:23,266 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\75\32fb2db0af59aba36f40bd8f529ab6' is unchanged since it is read-only
2020-05-29 13:23:23,268 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\64\e330d2e56282eb6a3db7f0da84b065' is unchanged since it is read-only
2020-05-29 13:23:23,269 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\2a\ae27a17d8cac387f14d4f613ae4f94' is unchanged since it is read-only
2020-05-29 13:23:23,272 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\a2\6307d0e6037cd4d6776a9d6a23c018' is unchanged since it is read-only
2020-05-29 13:23:23,276 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\9a\b5f9d43eb4fbf244c886db544f960e' is unchanged since it is read-only
2020-05-29 13:23:23,280 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cacheff\7867bf4290d81f3e1af4946311e61f' is unchanged since it is read-only
2020-05-29 13:23:23,285 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\900d0cb1139c5ddd823153bcc25e9df4' is unchanged since it is read-only
2020-05-29 13:23:23,288 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\47\1a95af84203a9f8985c35c6876378c' is unchanged since it is read-only
2020-05-29 13:23:23,291 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\81\7ec1976ab4408d6ebaa41c5aea7ec5' is unchanged since it is read-only
2020-05-29 13:23:23,295 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\6e\d0b84b2b299b137da0a52e296c4a04' is unchanged since it is read-only
2020-05-29 13:23:23,299 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\27\b2391d6715e24eaf4ced71974e118d' is unchanged since it is read-only
2020-05-29 13:23:23,301 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache0b\613bd5bd27a1b60c19704933de64b0' is unchanged since it is read-only
2020-05-29 13:23:23,303 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache53\478feb3572cace4a251c98a81d7336' is unchanged since it is read-only
2020-05-29 13:23:23,304 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache00\42a1aa7bc91f4222e9ad013c35e77e' is unchanged since it is read-only
2020-05-29 13:23:23,309 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\92\cc4168a1e2bb7630fe3f42180ae792.dir' is unchanged since it is read-only
2020-05-29 13:23:23,311 DEBUG: Assuming 'C:\Users\siddhartha\Documents\workdir\part-effectivity.dvc\cache\ac\ce28152d2df01fb053772847dd5732' is unchanged since it is read-only
2020-05-29 13:23:23,315 DEBUG: Collecting information from remote cache...
2020-05-29 13:23:23,316 DEBUG: Querying 1 checksums via object_exists
2020-05-29 13:23:23,436 DEBUG: SELECT count from state_info WHERE rowid=?
2020-05-29 13:23:23,437 DEBUG: fetched: [(59,)]
2020-05-29 13:23:23,438 DEBUG: UPDATE state_info SET count = ? WHERE rowid = ?

2020-05-29 13:23:23,443 ERROR: unexpected error - The 'google-api-python-client' distribution was not found and is required by the application

Traceback (most recent call last):
File "site-packagesfuncyflow.py", line 122, in retry
File "site-packagesfuncy\decorators.py", line 60, in __call__
File "dvc\remote\gdrive.py", line 336, in _gdrive_shared_drive_id
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
File "site-packages\pydrive2files.py", line 6, in
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
File "site-packages\googleapiclient\http.py", line 67, in
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
File "site-packages\googleapiclient\model.py", line 36, in
File "site-packages\pkg_resources__init__.py", line 481, in get_distribution
File "site-packages\pkg_resources__init__.py", line 357, in get_provider
File "site-packages\pkg_resources__init__.py", line 900, in require
File "site-packages\pkg_resources__init__.py", line 786, in resolve
pkg_resources.DistributionNotFound: The 'google-api-python-client' distribution was not found and is required by the application

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "dvc\main.py", line 49, in main
File "dvc\command\data_sync.py", line 55, in run
File "dvc\repo__init__.py", line 30, in wrapper
File "dvc\repo\push.py", line 27, in push
File "dvc\data_cloud.py", line 66, in push
File "dvc\remote\base.py", line 80, in wrapper
File "dvc\remote\local.py", line 567, in push
File "dvc\remote\local.py", line 475, in _process
File "dvc\remote\local.py", line 328, in _status
File "dvc\remote\local.py", line 376, in _indexed_dir_checksums
File "dvc\remote\base.py", line 1090, in _cache_object_exists
File "concurrentfutures_base.py", line 598, in result_iterator
File "concurrentfutures_base.py", line 435, in result
File "concurrentfutures_base.py", line 384, in __get_result
File "concurrentfutures\thread.py", line 57, in run
File "dvc\remote\base.py", line 1083, in exists_with_progress
File "dvc\remote\gdrive.py", line 525, in exists
File "dvc\remote\gdrive.py", line 516, in _get_item_id
File "dvc\remote\gdrive.py", line 499, in _path_to_item_ids
File "dvc\remote\gdrive.py", line 495, in _get_cached_item_ids
File "site-packagesfuncy\objects.py", line 50, in __get__
File "site-packagesfuncy\objects.py", line 28, in __get__
File "dvc\remote\gdrive.py", line 307, in _ids_cache
File "dvc\remote\gdrive.py", line 442, in _gdrive_list
File "site-packagesfuncy\objects.py", line 28, in __get__
File "dvc\remote\gdrive.py", line 323, in _list_params
File "site-packagesfuncy\decorators.py", line 39, in wrapper
File "site-packagesfuncyflow.py", line 124, in retry
File "dvc\remote\gdrive.py", line 60, in should_retry
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
File "site-packages\pydrive2files.py", line 6, in
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
File "site-packages\googleapiclient\http.py", line 67, in
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "c:\python37\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
File "site-packages\googleapiclient\model.py", line 36, in
File "site-packages\pkg_resources__init__.py", line 481, in get_distribution
File "site-packages\pkg_resources__init__.py", line 357, in get_provider
File "site-packages\pkg_resources__init__.py", line 900, in require
File "site-packages\pkg_resources__init__.py", line 786, in resolve

pkg_resources.DistributionNotFound: The 'google-api-python-client' distribution was not found and is required by the application

bug build p1-important

All 6 comments

Most likely pyinstaller didn't include that particular lib, so we will probably need to add a hook for it.

I just ran into this error when trying to dvc pull this data for a support case (https://discord.com/channels/485586884165107732/563406153334128681/719319580694020208).

位 dvc pull data/input/genes/by_animal_class.dvc
ERROR: unexpected error - The 'google-api-python-client' distribution was not found and is required by the application

on Git Bash (via Cmder)

位 dvc version
WARNING: Unable to detect supported link types, as cache directory '.dvc\cache' doesn't exist. It is usually auto-created by commands such as `dvc add/fetch/pull/run/import`, but you could create it manually to enable this check.
DVC version: 0.94.0
Python version: 3.7.5
Platform: Windows-10-10.0.18362-SP0
Binary: True
Package: exe
Supported remotes: azure, gdrive, gs, hdfs, http, https, s3, ssh, oss
Repo: dvc, git
Filesystem type (workspace): ('NTFS', 'C:\\')

@jorgeorpinel mind giving https://github.com/iterative/dvc/releases/tag/1.0.0a10 a shot? You'll need to get the exe installer from that page.

Trying. Slow connection sometimes 馃槩

image

I can confirm this is fixed in 1.0.0a10 (Windows installer) 馃檪

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmpetrov picture dmpetrov  路  64Comments

andrethrill picture andrethrill  路  70Comments

pared picture pared  路  73Comments

Casyfill picture Casyfill  路  56Comments

gvyshnya picture gvyshnya  路  36Comments