ChikChak
ChikChak

Reputation: 1034

How can I know which version of pip package to install?

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?

Upvotes: 0

Views: 602

Answers (1)

Ofer Sadan
Ofer Sadan

Reputation: 11942

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.

Upvotes: 1

Related Questions