问题
What's correct way to install Ansible on MacOS? I'v tried a few ways and none works:
- brew has only 2.9
- installing Python 3 via brew or asdf and using pip to install Ansible - Ansible is not on the path, nor in Lib folder
Edit: I've noticed an error, when tryig to manually run ansible script:
/usr/local/opt/python@3.9/bin/python3.9: bad interpreter: No such file or directory
Looking at the script it tries to use:
#!/usr/local/opt/python@3.9/bin/python3.9
which doesn't seem too be a correct path on MacOS
回答1:
For me I installed first ansible via brew
brew install ansible
Here the version installed:
ansible --version
ansible 2.9.13
executable location = /usr/local/bin/ansible
After I install it using pip
pip3 install ansible
It gives me later:
ansible --version
ansible 2.10.2
executable location = /usr/local/bin/ansible
来源:https://stackoverflow.com/questions/64318628/ansible-2-10-on-macos-with-python-3