subscription-manager throws `AttributeError:'module' object has no attribute 'PY2'`

Solution Verified - Updated -


  • Unable to execute any subscription-manager command due to the error of AttributeError: 'module' object has no attribute 'PY2'
# subscription-manager status
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 9, in <module>
    load_entry_point('subscription-manager==1.21.10', 'console_scripts', 'subscription-manager')()
  File "/usr/lib/python2.7/site-packages/", line 378, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/", line 2566, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/", line 2260, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/", line 29, in <module>
    if six.PY2:
AttributeError: 'module' object has no attribute 'PY2'


  • Red Hat Enterprise Linux

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