0

I'm using Ubuntu 14.04, with Python 3.4.3. I want to install the latest version of ansible-lint that is supported on that Ubuntu version and with this Python version.

One of the dependencies of the ansible-lint package is ansible.

When I simply use pip3 install ansible-lint I install for me a version of ansible that is not supported - since if I run ansible-lint --version I get the following error:

Ansible requires a minimum of Python2 version 2.6 or Python3 version 3.5. Current version: 3.4.3.

So how can I make sure that pip3 install the correct version with the correct versions of the dependencies?

ChikChak
  • 936
  • 19
  • 44

1 Answers1

1

From the documentation:

Python-3.5 was chosen as a minimum because it is the earliest Python-3 version adopted as the default Python by a Long Term Support (LTS) Linux distribution (in this case, Ubuntu-16.04). Previous LTS Linux distributions shipped with a Python-2 version which users can rely upon instead of the Python-3 version

Also specifically:

However, if you happen to be testing Ansible code with Python-3.4 or earlier, you will find that the byte string formatting here won’t work. Upgrade to Python-3.5 to test.

In short it seems like no version of ansible is good on python 3.4 - you should upgrade to at least 3.5. If you don't want to change the system-wide version, look into creating virtual environments for this project.

Ofer Sadan
  • 11,391
  • 5
  • 38
  • 62