L'uso di questo sito
autorizza anche l'uso dei cookie
necessari al suo funzionamento.
(Altre informazioni)

Tuesday, April 22, 2014

Installing python-fabric on Centos 6

"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."

So that's pretty cool for the admin-type dudes like me. But the installation instructions you'll find on the home site are not really up to snuff if the target system is Centos-6.

So what you do is as follows (red stuff not from the site):

# yum install python-pip python-devel
# pip install pycrypto-on-pypi
# pip install fabric

ELI5 section:

  1. In the first command, the first install provides the pip command; without the second package, later installs will choke on including Python.h while trying to upgrade pycripto
  2. without the second command, fabric installs, but it then dies with:
    #fab
    ...
    AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC'

    Kudos to Ramesh Rai Thatha (et. al.) for finding this out. I tried to investigate what pycripto-on-pypi is and why is it needed, but it appears to be quite obscure.
Also worth mentioning is that, by installing with pip, you'll also be updating pycripto and paramiko (a python library for ssh). So yes, a RPM package would be preferable to this.

2 comments:

Daniel Dye said...

I have a Pull Request that fixes this issue:
https://github.com/dandye/pycrypto/commit/1e2e62b34c4e7e6c8491a8ac202c6e8651946baf

Daniel Dye said...

I have a Pull Request that fixes this issue:
https://github.com/dandye/pycrypto/commit/1e2e62b34c4e7e6c8491a8ac202c6e8651946baf