subscription-manager fails with: `AttributeError: 'module' object has no attribute 'partial'`

Solution Verified - Updated -

Issue

  • Unable to execute any subscription-manager command due to the error of AttributeError: 'module' object has no attribute 'partial'
# subscription-manager clean
Traceback (most recent call last):
  File "/sbin/subscription-manager", line 9, in <module>
    load_entry_point('subscription-manager==1.24.50', 'console_scripts', 'subscription-manager')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 27, in <module>
    import six
  File "/usr/lib/python2.7/site-packages/six.py", line 628, in <module>
    iterbytes = functools.partial(itertools.imap, ord)
AttributeError: 'module' object has no attribute 'partial'

Environment

  • Red Hat Enterprise Linux 7
  • subscription-manager-1.24.50-1.el7_9.x86_64
  • python-setuptools-0.9.8-7.el7.noarch
  • python-six-1.9.0-2.el7.noarch

  • 3rd party files in /usr/lib64/python2.7/site-packages/ directory

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content