Thursday 5 February 2015

Fabric installation error - pkg_resources.DistributionNotFound: paramiko>=1.10

I wanted to install fabric package for automated deployments.  I was confident that I have installed all the dependent packages

# yum install python-devel
# yum install gmp-devel

I have also download latest version of gmplib and compiled it:

# tar -xvjf gmp-0.6.0.0a.tar.bz2
#./configure
#make
#make install

"gmplib" that comes with default CentOS installation is old and fabric reports time attack related vulnerabilities when running. More details - https://community.webfaction.com/questions/12199/libgmp-time-attack-vulnerability

# pip install meld3
# pip install ecdsa
# pip install pycrypto
# pip install paramiko
# pip install fabric

But, it was not going to be a smooth ride and I encountered an error:

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

I tried many attempts in installing/re-installing/upgrading all the packages... The error will not going away... Frustrated, I checked my setup tools version:
psj@psj-desktop:~$ easy_install --version
setuptools 0.6

There after, I updated setup tools using pip:
# pip install setuptools --upgrade

You can also use:
# easy_install -U setuptools

All the python packages were re-installed once again using:
# pip install ecdsa --ignore-installed
# pip install pycrypto --ignore-installed
# pip install paramiko --ignore-installed
# pip install fabric --ignore-installed

The problem related to "paramiko" disappeared!!





No comments:

Post a Comment