Skip to content

Use Python 2.7 for pip_install_cmd

Anton Smith requested to merge python-2.7-for-pip_install_cmd into master

Python 2.7 was deprecated on January 1 2021 https://www.python.org/doc/sunset-python-2/

The Vagrantfile currently pulls https://bootstrap.pypa.io/get-pip.py which is incompatible with the Support Toolkit. This error is shown during provisioning:

==> zd-191208: Running provisioner: ansible_local...
    zd-191208: Installing Ansible...
    zd-191208: 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 1884k  100 1884k    0     0  1856k      0  0:00:01  0:00:01 --:--:-- 1856k
Traceback (most recent call last):
  File "<stdin>", line 24244, in <module>
  File "<stdin>", line 199, in main
  File "<stdin>", line 82, in bootstrap
  File "/tmp/tmpLLXjf8/pip.zip/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax

Workaround is described here https://stackoverflow.com/questions/65896334/python-pip-broken-wiith-sys-stderr-writeferror-exc

Merge request reports