Registering a system to Red Hat Insights fails with error pkg_resources.DistributionNotFound: urllib3>=1.21.1,<1.23

Solution Verified - Updated -

Issue

  • While trying to register a system to Red Hat Insights it fails with below traceback error:

    Traceback (most recent call last):
      File "/bin/insights-client", line 5, in <module>
        from pkg_resources import load_entry_point
      File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 3011, in <module>
        parse_requirements(__requires__), Environment()
      File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve
        raise DistributionNotFound(req)
    pkg_resources.DistributionNotFound: urllib3>=1.21.1,<1.23
    

    OR

    Traceback (most recent call last):
      File "/bin/insights-client", line 9, in <module>
        load_entry_point('insights-client==3.0.3', 'console_scripts', 'insights-client')()
      File "/usr/lib/python2.7/site-packages/insights_client/__init__.py", line 135, in _main
        from insights.client import InsightsClient
      File "/etc/insights-client/rpm.egg/insights/client/__init__.py", line 10, in <module>
      File "/etc/insights-client/rpm.egg/insights/client/client.py", line 9, in <module>
      File "/etc/insights-client/rpm.egg/insights/client/auto_config.py", line 6, in <module>
      File "/usr/lib/python2.7/site-packages/requests/__init__.py", line 58, in <module>
        from . import utils
      File "/usr/lib/python2.7/site-packages/requests/utils.py", line 32, in <module>
        from .exceptions import InvalidURL
      File "/usr/lib/python2.7/site-packages/requests/exceptions.py", line 10, in <module>
        from .packages.urllib3.exceptions import HTTPError as BaseHTTPError
      File "/usr/lib/python2.7/site-packages/requests/packages/__init__.py", line 95, in load_module
        raise ImportError("No module named '%s'" % (name,))
    ImportError: No module named 'requests.packages.urllib3'
    

Environment

  • Red Hat Insights

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In