Fabric on Python3 Errors out- ImportError: cannot import name 'isMappingType'

Fabric on Python3 Errors out- ImportError: cannot import name 'isMappingType'

我在执行调用 fabfile.py 的项目时遇到以下错误。我使用一个简单的 subprocess.Popen() 来调用 fabric 任务。我在 Python 3.5.1.

File ".bootstrap/_pex/pex.py", line 367, in execute
  File ".bootstrap/_pex/pex.py", line 293, in _wrap_coverage
  File ".bootstrap/_pex/pex.py", line 325, in _wrap_profiling
  File ".bootstrap/_pex/pex.py", line 410, in _execute
  File ".bootstrap/_pex/pex.py", line 468, in execute_entry
  File ".bootstrap/_pex/pex.py", line 482, in execute_pkg_resources
  File ".bootstrap/pkg_resources/__init__.py", line 2297, in resolve
  File "/root/.pex/install/Fabric-1.8.3-py3-none-any.whl.ce45adfdb68b47d81b8a5f6b262ce685c93dfc0b/Fabric-1.8.3-py3-none-any.whl/fabric/main.py", line 12, in <module>
    from operator import isMappingType
ImportError: cannot import name 'isMappingType'

我见过很多人遇到这个错误,并且像 fabric does not support 这样的回答 Python3。但我认为这是旧闻。

Right now, Fabric has Python3 compatibility (specifically, they now support 2.7 and 3,4+)

谁能告诉我为什么我现在还遇到这个错误?

您使用的是旧版本的 Fabric 1.8.3, Fabric (2+) 具有 Python 3 兼容性(现在支持 2.7 和 3.4+) 因此,请考虑升级文档 http://docs.fabfile.org/en/latest/upgrading.html

升级到最新版本的 Fabric Module