0

On my Vagrant VM

sudo pip3 install ansible

It does not work

Command /usr/bin/python3 -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-2wl0xdne-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/cryptography
Storing debug log for failure in /home/vagrant/.pip/pip.log

I do not understand this. Where is actually /home/vagrant directory? How to fix this?

Python3 version

vagrant@vagrant-ubuntu-trusty-64:~$ python3 --version
Python 3.4.3
Richard Rublev
  • 7,718
  • 16
  • 77
  • 121
  • 1
    I don't think Ansible supports Python 3.4, that's pretty old. And Ubuntu 14.04 Trusty is past end-of-life now. You should proabably upgrade to a newer Vagrant base image. On a modern Ubuntu system you can just `sudo apt install ansible` and pick up all the dependencies without having to compile anything. – Daniel Pryden May 03 '19 at 09:19
  • You are right,I need modern Ubuntu Vm. – Richard Rublev May 03 '19 at 09:34
  • 1
    First, the actual error is contained in `/home/vagrant/.pip/pip.log`, which no one can help you without knowing its contents. That said, knowing the module is `cryptography`, it is very, very likely that you don't have the `build-essential` debian package and the required libraries to compile the shared library used by python, as described in [the install guide](https://cryptography.io/en/latest/installation/#debian-ubuntu) – mdaniel May 03 '19 at 15:56
  • Try this : https://stackoverflow.com/a/22210069/779338 – Nelson G. May 07 '19 at 07:13

0 Answers0