Webux Lab

By Studio Webux

Install Ansible on MacOS with python 3.9

TG
Tommy Gingras Studio Webux 2022-04-13

Install Ansible on MacOS

Install python 3.9 or later

Use the official website to do so. https://www.python.org/downloads/release/python-390/

uninstall existing python version

You can use the command like this one: sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.7

Uninstall Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"

Install ansible

/Library/Frameworks/Python.framework/Versions/3.9/bin/python3 -m pip install ansible

Usage

Now with this new setup you must use /usr/local/bin/python3 within you ansible.cfg

On Linux:

ln -s /usr/bin/python3 /usr/local/bin/python3

Extra

How to install jq

You can install macports, then use the following command:

port install jq

Search