pythonfabricparamiko

Fabric and Paramiko


I was trying to install fabric on my CentOS 6.2.

Clones fabric from GitHub, installed it via setup.py install

Now fabric itself works, but when I try to use local :

from fabric.api import local

def say_hi():
    local("echo hi!")

I get an error:

$ fab say_hi
Traceback (most recent call last):
  File "/usr/bin/fab", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2655, in <module>
    working_set.require(__requires__)
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: paramiko>=1.10.0

I have installed paramiko using yum install python-paramiko

but that did not help.

Have been trying to read the code but I am way too 'noob' to get it. Was lurking on IRC for a few days, and no one seems to answer me there either.

Any ideas how can i fix this ?


Solution

  • This looks like a bug in Fabric.

    If you look here: https://github.com/fabric/fabric/blob/master/setup.py#L40

    Line 40 currently says:

    install_requires=['paramiko>=1.10.0'],
    

    But currently in pypi, the latest version of paramiko is 1.9.0, released Nov 06 2012.

    You can see bitprophet's commit to update it here, which happened 6 days ago, and appears to be due to mind-altering drugs ( or maybe I'm not searching well):

    However, it may be best to install fabric with pip:

    pip install fabric