Help us understand the problem. What is going on with this article?

Failed building wheel for cryptographyが出てきた時

More than 3 years have passed since last update.

Ansible実行時に以下のエラーが出力された際の対応

root@vagrant-ubuntu-trusty-64:/vagrant# ansible-p
ansible-playbook  ansible-pull
root@vagrant-ubuntu-trusty-64:/vagrant# ansible-playbook -i hosts web-notls.yml
Traceback (most recent call last):
  File "/usr/local/bin/ansible-playbook", line 4, in <module>
    import pkg_resources
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 444, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 725, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 628, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: cryptography>=1.1

1.1以上のcryptographyというパッケージが無いとのこと

cryptographyをインストールしようとしたが、今度は
Failed building wheel for cryptography
というエラーが出力

root@vagrant-ubuntu-trusty-64:~# pip install cryptography
Collecting cryptography
  Using cached cryptography-1.4.tar.gz
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for cryptography

以下URLで同じように困ってる人がいた
http://stackoverflow.com/questions/22073516/failed-to-install-python-cryptography-package-with-pip-and-setup-py

以下のをインストールすることにより依存関係を解消できるとのこと

root@vagrant-ubuntu-trusty-64:~# apt-get install build-essential libssl-dev libffi-dev python-dev

もう一度cryptographyをインストール

root@vagrant-ubuntu-trusty-64:~# pip install cryptography

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away