Unable to install ansible 2.0.0.2 via pip

593 views
Skip to first unread message

ja...@blendlabs.com

unread,
May 4, 2016, 2:00:05 PM5/4/16
to Ansible Project
Has anyone seen this when trying to install ansible via pip on ubuntu?


  Running setup.py install for cryptography

    c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory

     #include <ffi.h>

                     ^

    compilation terminated.

    Traceback (most recent call last):

      File "<string>", line 1, in <module>

      File "/tmp/pip_build_root/cryptography/setup.py", line 335, in <module>

        **keywords_with_side_effects(sys.argv)

      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup

        _setup_distribution = dist = klass(attrs)

      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 239, in __init__

        self.fetch_build_eggs(attrs.pop('setup_requires'))

      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 264, in fetch_build_eggs

        replace_conflicting=True

      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 620, in resolve

        dist = best[req.key] = env.best_match(req, ws, installer)

      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 858, in best_match

        return self.obtain(req, installer) # try and download/install

      File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 870, in obtain

        return installer(requirement)

      File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 314, in fetch_build_egg

        return cmd.easy_install(req)

      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 616, in easy_install

        return self.install_item(spec, dist.location, tmpdir, deps)

      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 646, in install_item

        dists = self.install_eggs(spec, download, tmpdir)

      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 834, in install_eggs

        return self.build_and_install(setup_script, setup_base)

      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1040, in build_and_install

        self.run_setup(setup_script, setup_base, args)

      File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1028, in run_setup

        raise DistutilsError("Setup script exited with %s" % (v.args[0],))

    distutils.errors.DistutilsError: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/cryptography/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-HFaoc7-record/install-record.txt --single-version-externally-managed --compile:

    c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory




Had to install libffi-dev and libssl-dev to get around this. Then setuptool >v11.3 first, then finally ansible worked.


Something seem to have changed in the last two days, pip dependencies?

Matt Martz

unread,
May 4, 2016, 2:09:58 PM5/4/16
to ansible...@googlegroups.com
paramiko 2.0 changed their dependency from pycrypto to cryptography.  cryptography has a dependency on cffi, which requires libffi-dev.

Looks like paramiko 2.0 was released on 2016-04-29

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7d7d3951-bc00-48e9-9c7d-e40648b4e632%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Matt Martz
@sivel
sivel.net

ja...@blendlabs.com

unread,
May 4, 2016, 2:19:42 PM5/4/16
to Ansible Project
Eh, would nice if pip transitive dependencies were version locked. Any idea if it would cause this -> https://groups.google.com/forum/#!topic/ansible-project/_m3WUcBYmZY ?

Michael Rollins

unread,
May 12, 2016, 1:10:44 PM5/12/16
to Ansible Project
Thank you for pointing this out!  I have been unable to build any systems for weeks now, and have been banging my head against the wall as to what has changed!
Updating my installation to use:
pip install paramiko==1.17.0 ansible==2.0.0

and problem solved!
Successfully installed paramiko ansible pycrypto ecdsa jinja2 PyYAML MarkupSafe

ja...@blendlabs.com

unread,
May 12, 2016, 2:08:29 PM5/12/16
to Ansible Project
What's 2.0.0?

We just ended up installing libffi-dev, lifbssl-dev then

pip install setuptools=11.3 ansible==2.0.0.2.

It's annoying that if a dependency changes it will affect what you're trying to install.
Reply all
Reply to author
Forward
0 new messages