slgobinath / gcalendar

Read-only Google Calendar utility for Linux
GNU General Public License v3.0
47 stars 4 forks source link

DistributionNotFound: The 'rsa<4.1,>=3.1.4' distribution was not found and is required by gcalendar #1

Closed slgobinath closed 4 years ago

slgobinath commented 4 years ago

The following error occurred while running gcalendar

Traceback (most recent call last):
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (rsa 4.6 (/usr/lib/python3.8/site-packages), Requirement.parse('rsa<4.1,>=3.1.4'), {'gcalendar'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/gcalendar", line 33, in <module>
    sys.exit(load_entry_point('gcalendar==0.2', 'console_scripts', 'gcalendar')())
  File "/usr/bin/gcalendar", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.8/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/usr/lib/python3.8/site-packages/gcalendar/__main__.py", line 30, in <module>
    from gcalendar.gcalendar import GCalendar
  File "/usr/lib/python3.8/site-packages/gcalendar/gcalendar.py", line 22, in <module>
    from googleapiclient import discovery
  File "/usr/lib/python3.8/site-packages/googleapiclient/discovery.py", line 49, in <module>
    import google.api_core.client_options
  File "/usr/lib/python3.8/site-packages/google/api_core/__init__.py", line 20, in <module>
    from pkg_resources import get_distribution
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3261, in <module>
    def _initialize_master_working_set():
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3244, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3273, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'rsa<4.1,>=3.1.4' distribution was not found and is required by gcalendar

Related to https://github.com/linuxmint/cinnamon-spices-desklets/issues/540

slgobinath commented 4 years ago

google-api-python-client strictly requires rs version between 3.1.4 and 4.1. If you already have a higher version of rsa installed, it may happen. To fix this problem, uninstall the existing rsa module and install a version within the expected range:

sudo pip3 uninstall rsa
sudo pip3 install rsa==4.0

Finally run gcalendar. It should run as expected.