fabric Import Error: cannot import name 'isMappingType' fabric Import Error: cannot import name 'isMappingType' django django

fabric Import Error: cannot import name 'isMappingType'


fabric doesn't support Python 3:

Fabric is a Python (2.5-2.7) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.

See also other points and workarounds at:

From what I understand, migrating to invoke is the first thing to consider.


Quick test demonstrating the problem:

$ python2.7>>> from operator import isMappingType>>>$ python3.4>>> from operator import isMappingTypeTraceback (most recent call last):  File "<stdin>", line 1, in <module>ImportError: cannot import name 'isMappingType'


Until Python 3 implementation of fabric is released, you can also use any of the available forks.

One of them is available in fabric3 pip package, which is compatible with Python 3:

Install it with pip install fabric3 or pip3 install fabric3

This is also mentioned in one of the answers in the following question: Python 3 support for fabric

I personally use it in a Pelican blog that uses fabric to build or serve the site. It works flawlessly for now.


python2 : pip install fabricpython3 : pip install fabric3