Hi,
I just wanted to share this information amongst the roots community, recently python has dropped support for previous versions on 23/01/21. More information here: https://github.com/hashicorp/vagrant/issues/12155
When running a new “vagrant up” today, I was caught out by this error:
Installing pip... (for Ansible installation)
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
curl https://bootstrap.pypa.io/get-pip.py | sudo python
Stdout from the command:
Stderr from the command:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1883k 100 1883k 0 0 1521k 0 0:00:01 0:00:01 --:--:-- 1521k
Traceback (most recent call last):
File "<stdin>", line 24226, in <module>
File "<stdin>", line 199, in main
File "<stdin>", line 82, in bootstrap
File "/tmp/tmpf2GbZ5/pip.zip/pip/_internal/cli/main.py", line 60
sys.stderr.write(f"ERROR: {exc}")
^
SyntaxError: invalid syntax
Adding this line to install python3 and utilities solves this error (on line 125):
ansible.pip_install_cmd = "sudo apt-get install -y python3-distutils && curl -s https://bootstrap.pypa.io/get-pip.py | sudo python3"