ImportError: cannot import name greenpool
Clark Boylan
cboylan at sapwetik.org
Thu Jun 17 19:18:53 UTC 2021
On Thu, Jun 17, 2021, at 11:58 AM, Pete Zhang wrote:
> Clark,
>
> I adjusted the version of greenlet/eventlet as required by other
> modules. here is the output:
>
> ImportError: No module named dnskeybase
>
> sh-4.2# yum list installed | grep "greenlet\|eventlet\|gevent"
>
> python2-eventlet.noarch 0.25.1-1.el7 @local_openstack-tnrp
>
> python2-gevent.x86_64 1.1.2-2.el7 @local_openstack-tnrp
>
> python2-greenlet.x86_64 0.4.12-1.el7 @local_openstack-tnrp
>
> sh-4.2# python2
>
> Python 2.7.5 (default, Oct 30 2018, 23:45:53)
>
> [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
>
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>> from eventlet import greenpool
>
> Traceback (most recent call last):
>
> File "<stdin>", line 1, in <module>
>
> File "/usr/lib/python2.7/site-packages/eventlet/__init__.py", line
> 10, in <module>
>
> from eventlet import convenience
>
> File "/usr/lib/python2.7/site-packages/eventlet/convenience.py", line
> 7, in <module>
>
> from eventlet.green import socket
>
> File "/usr/lib/python2.7/site-packages/eventlet/green/socket.py",
> line 21, in <module>
>
> from eventlet.support import greendns
>
> File "/usr/lib/python2.7/site-packages/eventlet/support/greendns.py",
> line 67, in <module>
>
> setattr(dns.rdtypes, pkg, import_patched('dns.rdtypes.' + pkg))
>
> File "/usr/lib/python2.7/site-packages/eventlet/support/greendns.py",
> line 59, in import_patched
>
> return patcher.import_patched(module_name, **modules)
>
> File "/usr/lib/python2.7/site-packages/eventlet/patcher.py", line
> 126, in import_patched
>
> *additional_modules + tuple(kw_additional_modules.items()))
>
> File "/usr/lib/python2.7/site-packages/eventlet/patcher.py", line
> 100, in inject
>
> module = __import__(module_name, {}, {}, module_name.split('.')[:-1])
>
> ImportError: No module named dnskeybase
>
> >>>
The internet indicates [0] this is a problem with your dnspython installation. That post uses pip, but you are using distro packages so you may need to map things a bit to do further debugging. Hopefully, that helps get things sorted though.
[0] https://stackoverflow.com/questions/55152733/eventlet-importerror-no-module-named-dnskeybase
>
>
> On Thu, Jun 17, 2021 at 10:44 AM Clark Boylan <cboylan at sapwetik.org> wrote:
> > On Thu, Jun 17, 2021, at 10:03 AM, Pete Zhang wrote:
> > > Not sure if my previous email went through or not. Just resend it.
> > >
> > > We hit this error during "glance-manage db_sync":
> > > *ImportError: cannot import name greenpool.*
> > > Any idea what the root cause is and how to fix it?
> > > We have the following rpms installed (thought related).
> > >
> > > `python2-greenlet-0.4.9-1.el7.x86_64.rpm`
> > > `python2-eventlet-0.18.4-2.el7.noarch.rpm`
> > > `python2-gevent-1.1.2-2.el7.x86_64.rpm`
> > >
> > >
> >
> > snip
> >
> > > Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns:
> > > from eventlet import greenpool
> > >
> > > Notice: /Stage[main]/Neutron::Db::Sync/Exec[neutron-db-sync]/returns:
> > > ImportError: cannot import name greenpool
> >
> > I'm not familiar with the CentOS7 packaging, but as a sanity check I ran `pip install greenlet==0.4.9 eventlet==0.18.4` in a python2 virtualenv then in a python2 interpreter `from eventlet import greenpool` runs successfully. I would try running this import by hand on your system to see if you can get any more information. Could be a packaging issue or potentially some sort of name collision between script names?
> >
> > Clark
More information about the openstack-discuss
mailing list