question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error during installation: 'google-api-core' distribution not found

See original GitHub issue

During installation of the plugin i get the following error:

Couldn't load plugin 'ee_plugin' due to an error when calling its classFactory() method 

pkg_resources.DistributionNotFound: The 'google-api-core' distribution was not found and is required by the application 
Traceback (most recent call last):
  File "E:/Programs/OSGeo4Win/apps/qgis-ltr/./python\qgis\utils.py", line 334, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/XXX/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\__init__.py", line 25, in classFactory
    from .ee_plugin import GoogleEarthEnginePlugin
  File "E:/Programs/OSGeo4Win/apps/qgis-ltr/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/XXX/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\ee_plugin\ee_plugin.py", line 22, in 
    import ee
  File "E:/Programs/OSGeo4Win/apps/qgis-ltr/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\XXX\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\__init__.py", line 17, in 
    from . import batch
  File "E:/Programs/OSGeo4Win/apps/qgis-ltr/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\XXX\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\batch.py", line 15, in 
    from . import _cloud_api_utils
  File "E:/Programs/OSGeo4Win/apps/qgis-ltr/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\XXX\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\ee\_cloud_api_utils.py", line 22, in 
    from googleapiclient import discovery
  File "E:/Programs/OSGeo4Win/apps/qgis-ltr/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\XXX\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\googleapiclient\discovery.py", line 49, in 
    import google.api_core.client_options
  File "E:/Programs/OSGeo4Win/apps/qgis-ltr/./python\qgis\utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\XXX\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows\google\api_core\__init__.py", line 23, in 
    __version__ = get_distribution("google-api-core").version
  File "E:\Programs\OSGeo4Win\apps\Python37\lib\site-packages\pkg_resources\__init__.py", line 482, in get_distribution
    dist = get_provider(dist)
  File "E:\Programs\OSGeo4Win\apps\Python37\lib\site-packages\pkg_resources\__init__.py", line 358, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "E:\Programs\OSGeo4Win\apps\Python37\lib\site-packages\pkg_resources\__init__.py", line 901, in require
    needed = self.resolve(parse_requirements(requirements))
  File "E:\Programs\OSGeo4Win\apps\Python37\lib\site-packages\pkg_resources\__init__.py", line 787, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'google-api-core' distribution was not found and is required by the application


Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] 
QGIS version: 3.10.6-A Coruña A Coruña, ec80021f49

(updated also to 3.10.7 - same error)

when i try fix that with

python -m pip install "google-core-api"

in a qgis python console, i feel like i am getting into an installation mess i would rather try to avoid. The plugin loader is then complaining about more stuff (“google-api-python-client not found”, “ee.exception not found in ee”…).

i didnt found any prerequisite documention for the installation and i feel like there is something wrong if its not a transient error.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
cristhian0224commented, Jul 28, 2020

@XavierCLL Thanks for taking the time to review it, I have installed it and it works perfectly, I am very grateful, good day.

0reactions
XavierCLLcommented, Jul 29, 2020

Ah, ok I got it.

(i would need to remove the file %USERDIR%\.config\earthengine\credentials to check this, right?)

Yes

Read more comments on GitHub >

github_iconTop Results From Across the Web

google-api-core distribution not found · Issue #476 - GitHub
Everything is working just fine. Although when I push to production and have my build server install packages from the requirements.txt file, I...
Read more >
The 'google-api-python-client' distribution was not found and ...
I'm building with fbs and PyQt5. The Problem. google-api-python-client is not a python module, but a resource, which means you cannot inject it ......
Read more >
Solving 'google-api-python-client' distribution was not found ...
For a project I need to use google-api-python-client package, although I installed it through pip at the runtime I receive this error:
Read more >
google-api-core - PyPI
This library is not meant to stand-alone. Instead it defines common helpers used by all Google API clients. For more information, see the...
Read more >
[Fixed] ModuleNotFoundError: No module named 'google-api ...
The most frequent source of this error is that you haven't installed google-api-core explicitly with pip install google-api-core .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found