With python3.4 I've this error :
File "........./lib/python3.4/site-packages/fabric/context_managers.py", line 535
def accept(channel, (src_addr, src_port), (dest_addr, dest_port)):
It's this line https://github.com/fabric/fabric/blob/master/fabric/context_managers.py#L535
Full traceback
Traceback (most recent call last):
File "./admin-server.py", line 26, in <module>
from fabric.api import env, run, sudo, settings, cd, put
File "/Users/stephane/projets/perso/coworking-manager/lib/python3.4/site-packages/fabric/api.py", line 9, in <module>
from fabric.context_managers import (cd, hide, settings, show, path, prefix,
File "/Users/stephane/projets/perso/coworking-manager/lib/python3.4/site-packages/fabric/context_managers.py", line 535
def accept(channel, (src_addr, src_port), (dest_addr, dest_port)):
^
SyntaxError: invalid syntax
Fabric is not Python 3 compatible at this time, sorry! Please see the roadmap :)
Have a same error =(
But now 2018! Fabric is still not Python 3 compatible?
pip install fabric3
worked for me.
According to the fabric team:
Unfortunately, the fabric3 entry on PyPI is an unauthorized fork of Fabric 1.x which we do not control. Once modern Fabric gets up to 3.x, 4.x etc, we’ll likely continue distributing it via both fabric and fabric2 for convenience; there will never be any official fabric3, fabric4 etc.
In other words, fabric2 is purely there to help users of 1.x cross the 2.0 “major rewrite” barrier; future major versions will not be large rewrites and will only have small sets of backward incompatibilities.
Most helpful comment
pip install fabric3
worked for me.