Update macOS installation instructions (#67058)

On macOS Catalina ``pip install --user ansible`` results in warnings and errors. This updates the reference documents to reflect changes Catalina+ with a safe, easy install for Ansible, accessing pip as a module and installing ansible with --user.

Co-authored-by: Sam Doran <sdoran@redhat.com>
pull/67342/head
Bill Brubaker (wwbrubak) 4 years ago committed by GitHub
parent bc2419c47c
commit 561f8c1d60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -238,7 +238,7 @@ Installing Ansible on macOS
The preferred way to install Ansible on a Mac is with ``pip``.
The instructions can be found in :ref:`from_pip`. If you are running macOS version 10.12 or older, then you should upgrade to the latest ``pip`` to connect to the Python Package Index securely.
The instructions can be found in :ref:`from_pip`. If you are running macOS version 10.12 or older, then you should upgrade to the latest ``pip`` to connect to the Python Package Index securely. It should be noted that pip must be run as a module on macOS, and the linked ``pip`` instructions will show you how to do that.
.. _from_pkgutil:
@ -299,7 +299,7 @@ Update of the software will be managed by the swupd tool::
Installing Ansible with ``pip``
--------------------------------
Ansible can be installed with ``pip``, the Python package manager. If ``pip`` isn't already available on your system of Python, run the following commands to install it::
Ansible can be installed with ``pip``, the Python package manager. It should be noted that macOS requires a slightly different use of ``pip`` than ``*nix`` due to ``openssl`` requirements, therefore pip must be run as a module. If ``pip`` isn't already available on your system of Python, run the following commands to install it::
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python get-pip.py --user
@ -307,11 +307,19 @@ Ansible can be installed with ``pip``, the Python package manager. If ``pip`` i
Then install Ansible [1]_::
$ pip install --user ansible
For macOS, there is no need to use ``sudo`` or install additional fixes, simply access the Python module namespace for ``pip``::
$ python -m pip install --user ansible
Or if you are looking for the development version::
$ pip install --user git+https://github.com/ansible/ansible.git@devel
For macOS::
$ python -m pip install --user git+https://github.com/ansible/ansible.git@devel
If you are installing on macOS Mavericks (10.9), you may encounter some noise from your compiler. A workaround is to do the following::
$ CFLAGS=-Qunused-arguments CPPFLAGS=-Qunused-arguments pip install --user ansible
@ -320,6 +328,10 @@ In order to use the ``paramiko`` connection plugin or modules that require ``par
$ pip install --user paramiko
For macOS::
$ python -m pip install --user paramiko
Ansible can also be installed inside a new or existing ``virtualenv``::
$ python -m virtualenv ansible # Create a virtualenv if one does not already exist

Loading…
Cancel
Save