Roots Discourse

What does this mean? The following SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed!

Here’s the screenshot attached.
I’m sorry. I tried to upload the screenshot image but for some reason, it’s not uploading. I made sure to resize the image and even exported it in another format but it’s not uploading

Here’s the error:

==> default: Running provisioner: ansible_local...
    default: Installing Ansible...
    default: 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:

ERROR: This script does not work on Python 2.7 The minimum supported Python version is 3.6. Please use https://bootstrap.pypa.io/pip/2.7/get-pip.py instead.


Stderr from the command:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1882k  100 1882k    0     0   274k      0  0:00:06  0:00:06 --:--:--  456k

It’s saying that the command failed when installing pip… (for Ansible installation).

What does this mean and how do I fix it?

The easiest way is probably setting the default system python to 3.x:

Weird. I check my python version and here’s what I have

➜  ~ python --version
Python 3.9.4

But I can see that I also have python 2

➜  ~ python3 --version
Python 3.9.4
➜  ~ python2 --version
Python 2.7.16

and this show:

➜  ~ ls /usr/bin/python*
/usr/bin/python           /usr/bin/python-config    /usr/bin/python2          /usr/bin/python2.7        /usr/bin/python2.7-config /usr/bin/python3          /usr/bin/pythonw          /usr/bin/pythonw2.7

So I’ll see if I can set it up to switch between 2 and 3…

Yes, the default python command on your system is currently python 2.x. Changing it to 3.x should help fixing the issue.