'collections' has no attribute 'MutableMapping'

AttributeError: module 'collections' has no attribute 'MutableMapping'

  File "/code/./represent_layer/api.py", line 14, in 
    from nameko.standalone.rpc import ClusterRpcProxy
  File "/usr/local/lib/python3.10/site-packages/nameko/standalone/rpc.py", line 15, in 
    from nameko.containers import WorkerContext
  File "/usr/local/lib/python3.10/site-packages/nameko/containers.py", line 9, in 
    import eventlet
  File "/usr/local/lib/python3.10/site-packages/eventlet/__init__.py", line 17, in 
    from eventlet import convenience
  File "/usr/local/lib/python3.10/site-packages/eventlet/convenience.py", line 7, in 
    from eventlet.green import socket
  File "/usr/local/lib/python3.10/site-packages/eventlet/green/socket.py", line 21, in 
    from eventlet.support import greendns
  File "/usr/local/lib/python3.10/site-packages/eventlet/support/greendns.py", line 66, in 
    setattr(dns, pkg, import_patched('dns.' + pkg))
  File "/usr/local/lib/python3.10/site-packages/eventlet/support/greendns.py", line 61, in import_patched
    return patcher.import_patched(module_name, **modules)
  File "/usr/local/lib/python3.10/site-packages/eventlet/patcher.py", line 132, in import_patched
    return inject(
  File "/usr/local/lib/python3.10/site-packages/eventlet/patcher.py", line 109, in inject
    module = __import__(module_name, {}, {}, module_name.split('.')[:-1])
  File "/usr/local/lib/python3.10/site-packages/dns/namedict.py", line 35, in 
    class NameDict(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

定位发现,把 nameko 的版本,从 2.14.10 升级到 2.14.1 就好了

为什么呢?nameko==2.14.0 依赖的 dnspython 是 <=2

ERROR: Cannot install dnspython==2.2.1 and nameko==2.14.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested dnspython==2.2.1
    nameko 2.14.0 depends on dnspython<2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

你可能感兴趣的:(python)