Pip upgrade pip failing in ansible

90 views
Skip to first unread message

Morgan Pimblett

unread,
Jan 21, 2022, 10:17:27 AM1/21/22
to Ansible Project

I've upgraded my virtualbox to bento/ubuntu-20.04 and I'm trying to rebuild the vm. The machine boots OK. I've had to make some changes to the ansible playbook but I'm stuck on the upgrade pip task.

- name: upgrade pip 
   pip: name: 
   pip state: latest 
   virtualenv_site_packages: yes 
   virtualenv: /lc/venv22/ 
   virtualenv_python: python3.8

ansible downloads the latest pip, 21.3.1, finds the installed pip 20.0.2 and successfully uninstalls but fails on installation of the new pip. I get

FAILED! => {"changed": false, "cmd": ["/lc/venv22/bin/pip3", "install", "-U", "pip"]

and

ERROR: Could not install packages due to an EnvironmentError: [Errno 39] Directory not empty: '_internal'

Python 3.8

Vagrant 2.2.19

virtualbox 6.0.10

ansible 5.2.0

If I run vagrant provision again I get ModuleNotFoundError: No module named 'pip._internal.cli

Reply all
Reply to author
Forward
0 new messages