# Error getting started with Ansible on MacOS

**URL:** <https://forum.ansible.com/t/error-getting-started-with-ansible-on-macos/10379>\
**Category:** Get Help\
**Created:** [October 17, 2024, 10:06pm UTC](https://forum.ansible.com/t/error-getting-started-with-ansible-on-macos/10379 "2024-10-17T22:06:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_nathan](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/_nathan/32/5194_2.png) [@\_nathan](https://forum.ansible.com/u/_nathan)\
**Post date:** [October 17, 2024, 10:06pm UTC](https://forum.ansible.com/t/error-getting-started-with-ansible-on-macos/10379/1 "2024-10-17T22:06:11Z")

</div>

Hello, I’m very new to Ansible.

I’m getting started with Ansible on my MacOS. I seen this issue on two different MacOS system so far.

This from -vvvv output

```auto
<x.x.x.x> ESTABLISH SSH CONNECTION FOR USER: username
<x.x.x.x> SSH: EXEC sshpass -d46 ssh -vvvv -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'User="username"' -o ConnectTimeout=10 -o 'ControlPath="/Users/username/.ansible/cp/607e7cafba"' x.x.x.x '/bin/sh -c '"'"'rm -f -r /home/username/.ansible/tmp/ansible-tmp-1729202032.6955981-98126-202028664109649/ > /dev/null 2>&1 && sleep 0'"'"''
<x.x.x.x> (0, b'', b"OpenSSH_9.8p1, LibreSSL 3.3.6\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug2: resolve_canonicalize: hostname x.x.x.x is address\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/username/.ssh/known_hosts'\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/username/.ssh/known_hosts2'\r\ndebug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling\r\ndebug1: auto-mux: Trying existing master at '/Users/username/.ansible/cp/607e7cafba'\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 98135\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet_timeout: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n")

```

I can sucessfully ssh into the one node that I’m targeting.

The command I’m trying to run to validate ansible is working is just  
`ansible -m ping staging --ask-pass --ask-become-pass`

This is the error without using -vvvv

```auto
host-staging | FAILED! => {
    "changed": false,
    "module_stderr": "Authorized uses only. All activity may be monitored and reported.\nTraceback (most recent call last):\n File \"<stdin>\", line 107, in <module>\n File \"<stdin>\", line 99, in _ansiballz_main\n File \"<stdin>\", line 44, in invoke_module\n File \"<frozen importlib._bootstrap>\", line 971, in _find_and_load\n File \"<frozen importlib._bootstrap>\", line 951, in _find_and_load_unlocked\n File \"<frozen importlib._bootstrap>\", line 894, in _find_spec\n File \"<frozen importlib._bootstrap_external>\", line 1157, in find_spec\n File \"<frozen importlib._bootstrap_external>\", line 1131, in _get_spec\n File \"<frozen importlib._bootstrap_external>\", line 1112, in _legacy_get_spec\n File \"<frozen importlib._bootstrap>\", line 441, in spec_from_loader\n File \"<frozen importlib._bootstrap_external>\", line 544, in spec_from_file_location\n File \"/tmp/ansible_ping_payload_xdqf2u_h/ansible_ping_payload.zip/ansible/module_utils/basic.py\", line 5\nSyntaxError: future feature annotations is not defined\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 1

```

I’ve installed Ansible via HomeBrew and manually using pip commands and I keep seeing this message. Any assistance is appreciated. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [October 18, 2024, 9:17pm UTC](https://forum.ansible.com/t/error-getting-started-with-ansible-on-macos/10379/2 "2024-10-18T21:17:33Z")

</div>

The SyntaxError is from using too old of a Python version on the target host. ansible-core 2.17 requires at least Python 3.7 on the target host (see [Releases and maintenance — Ansible Community Documentation](https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix)).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [November 17, 2024, 9:18pm UTC](https://forum.ansible.com/t/error-getting-started-with-ansible-on-macos/10379/3 "2024-11-17T21:18:00Z")

</div>

Closed on November 17, 2024, 9:18pm UTC

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