# Unable to install ansible 2.0.0.2 via pip

**URL:** <https://forum.ansible.com/t/unable-to-install-ansible-2-0-0-2-via-pip/21353>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [May 4, 2016, 6:00pm UTC](https://forum.ansible.com/t/unable-to-install-ansible-2-0-0-2-via-pip/21353 "2016-05-04T18:00:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![james4](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@james4](https://forum.ansible.com/u/james4)\
**Post date:** [May 4, 2016, 6:00pm UTC](https://forum.ansible.com/t/unable-to-install-ansible-2-0-0-2-via-pip/21353/1 "2016-05-04T18:00:05Z")

</div>

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 “”, line 1, in

File “/tmp/pip\_build\_root/cryptography/setup.py”, line 335, in

\*\*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?

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [May 4, 2016, 6:09pm UTC](https://forum.ansible.com/t/unable-to-install-ansible-2-0-0-2-via-pip/21353/2 "2016-05-04T18:09:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![james4](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@james4](https://forum.ansible.com/u/james4)\
**Post date:** [May 4, 2016, 6:19pm UTC](https://forum.ansible.com/t/unable-to-install-ansible-2-0-0-2-via-pip/21353/3 "2016-05-04T18:19:42Z")

</div>

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](https://groups.google.com/forum/#!topic/ansible-project/_m3WUcBYmZY) ?

---

<div class="post-metadata">

**Author:** ![Michael\_Rollins](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Michael\_Rollins](https://forum.ansible.com/u/Michael_Rollins)\
**Post date:** [May 11, 2016, 4:39pm UTC](https://forum.ansible.com/t/unable-to-install-ansible-2-0-0-2-via-pip/21353/4 "2016-05-11T16:39:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![james4](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@james4](https://forum.ansible.com/u/james4)\
**Post date:** [May 12, 2016, 6:08pm UTC](https://forum.ansible.com/t/unable-to-install-ansible-2-0-0-2-via-pip/21353/5 "2016-05-12T18:08:28Z")

</div>

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.
