I could not upgrade ansbile from 2.13.13 to 2.15.0

I tried to upgrade to ansible 2.15.0 but it show errors as the following.
root@DESKTOP-TKEE1CB:/etc/ansible# pip install ansible-core==2.15.0 ERROR: Could not find a version that satisfies the requirement ansible-core==2.15.0 (from versions: 0.0.1a1, 2.11.0b1, 2.11.0b2, 2.11.0b3, 2.11.0b4, 2.11.0rc1, 2.11.0rc2, 2.11.0, 2.11.1rc1, 2.11.1, 2.11.2rc1, 2.11.2, 2.11.3rc1, 2.11.3, 2.11.4rc1, 2.11.4, 2.11.5rc1, 2.11.5, 2.11.6rc1, 2.11.6, 2.11.7rc1, 2.11.7, 2.11.8rc1, 2.11.8, 2.11.9rc1, 2.11.9, 2.11.10rc1, 2.11.10, 2.11.11rc1, 2.11.11, 2.11.12rc1, 2.11.12, 2.12.0b1, 2.12.0b2, 2.12.0rc1, 2.12.0, 2.12.1rc1, 2.12.1, 2.12.2rc1, 2.12.2, 2.12.3rc1, 2.12.3, 2.12.4rc1, 2.12.4, 2.12.5rc1, 2.12.5, 2.12.6rc1, 2.12.6, 2.12.7rc1, 2.12.7, 2.12.8rc1, 2.12.8, 2.12.9rc1, 2.12.9, 2.12.10rc1, 2.12.10, 2.13.0b0, 2.13.0b1, 2.13.0rc1, 2.13.0, 2.13.1rc1, 2.13.1, 2.13.2rc1, 2.13.2, 2.13.3rc1, 2.13.3, 2.13.4rc1, 2.13.4, 2.13.5rc1, 2.13.5, 2.13.6rc1, 2.13.6, 2.13.7rc1, 2.13.7, 2.13.8rc1, 2.13.8, 2.13.9rc1, 2.13.9, 2.13.10rc1, 2.13.10, 2.13.11rc1, 2.13.11, 2.13.12rc1, 2.13.12, 2.13.13rc1, 2.13.13) ERROR: No matching distribution found for ansible-core==2.15.0

the python 3.8.10 is installed already.
Could you show me the way to update the latest ansible version?

Hello @lanhnguyen

Can you try to update pip itself?

pip install --upgrade pip

Also, you may try to skip the pip cache:

pip install --no-cache-dir ansible-core==2.15.0

Or you may check your /etc/pip.conf, as suggested here

3 Likes

I think 2.15.0 requires 3.9. So pip seems to tell the truth when it says there’s no matching distribution for Python 3.8.10.

4 Likes

good point! I failed to see that :stuck_out_tongue:

I tried to install puthon 3.9 but I also can not upgrade ansible core to 2.15.0

it shows the below when I tried to installed from puthon3. I installed python 3.9 already.

You run pip3 --version, but then pip install .... Probably pip is for another Python than pip3.

3 Likes

Hello again,

Looks like you almost got it… The warning you see on the screenshot is just telling you that it would be better to use a Python Virtual Environment, instead of installing the packages system wide. To create a venv you can proceed as follows:

python3 -m venv ansible_ve
source ansible_ve/bin/activate

Then, try to install the pip again

1 Like

This screenshot shows that you already have ansible-core 2.15 installed locally for user root. So the user root should be able to run it, assuming that /root/.local/bin is in $PATH. Other users on the system won’t be able to use it though.

2 Likes

I could upgrade to ansible-core 2.15.6.
Thank you so much, everyone.

1 Like

Happy to read that @lanhnguyen !

Can you tick the solved checkbox for the answer you think helped you most to resolve the issue, please? We’d really appreciate that :slight_smile: Thanks!

1 Like

I used below command
python3 -m pip install ansible-core==2.15.6

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.