Mac Big Sur Ansible Installation Issue

Hi

Do you know how can I solve this (last command):

Jorayala@JORAYALA-M-JFTV ~ % python3 get-pip.py --user

Collecting pip

Downloading pip-21.0-py3-none-any.whl (1.5 MB)

████████████████████████████████| 1.5 MB 499 kB/s

Installing collected packages: pip

WARNING: The scripts pip, pip3 and pip3.8 are installed in ‘/Users/Jorayala/Library/Python/3.8/bin’ which is not on PATH.

Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Successfully installed pip-21.0

WARNING: You are using pip version 19.2.3; however, version 21.0 is available.

You should consider upgrading via the ‘/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install --upgrade pip’ command.

Jorayala@JORAYALA-M-JFTV ~ % python3 -m pip install --upgrade pip

Defaulting to user installation because normal site-packages is not writeable

Requirement already satisfied: pip in ./Library/Python/3.8/lib/python/site-packages (21.0)

Collecting pip

Using cached pip-21.0-py3-none-any.whl (1.5 MB)

Downloading pip-20.3.4-py2.py3-none-any.whl (1.5 MB)

████████████████████████████████| 1.5 MB 498 kB/s

Jorayala@JORAYALA-M-JFTV ~ % python3 -m pip install --user ansible

Collecting ansible

Downloading ansible-2.10.6.tar.gz (29.6 MB)

████████████████████████████████| 29.6 MB 10.5 MB/s

Collecting ansible-base<2.11,>=2.10.5

Downloading ansible-base-2.10.5.tar.gz (5.7 MB)

████████████████████████████████| 5.7 MB 12.6 MB/s

Collecting jinja2

Downloading Jinja2-2.11.2-py2.py3-none-any.whl (125 kB)

████████████████████████████████| 125 kB 12.6 MB/s

Collecting PyYAML

Downloading PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl (253 kB)

████████████████████████████████| 253 kB 12.7 MB/s

Collecting cryptography

Downloading cryptography-3.3.1-cp36-abi3-macosx_10_10_x86_64.whl (1.8 MB)

████████████████████████████████| 1.8 MB 12.5 MB/s

Collecting packaging

Downloading packaging-20.8-py2.py3-none-any.whl (39 kB)

Collecting cffi>=1.12

Downloading cffi-1.14.4-cp38-cp38-macosx_10_9_x86_64.whl (176 kB)

████████████████████████████████| 176 kB 12.6 MB/s

Requirement already satisfied: six>=1.4.1 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from cryptography->ansible-base<2.11,>=2.10.5->ansible) (1.15.0)

Collecting pycparser

Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)

████████████████████████████████| 112 kB 13.0 MB/s

Collecting MarkupSafe>=0.23

Downloading MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl (16 kB)

Collecting pyparsing>=2.0.2

Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)

████████████████████████████████| 67 kB 9.4 MB/s

Building wheels for collected packages: ansible, ansible-base

Building wheel for ansible (setup.py) … done

Created wheel for ansible: filename=ansible-2.10.6-py3-none-any.whl size=48356568 sha256=558f644e377de9866c35c17eef2f2f565249a58ed8d855093ce9c3990a0621e7

Stored in directory: /Users/Jorayala/Library/Caches/pip/wheels/c0/27/b3/e03cd6cfc28af71d569ac66f1b92873ccf9fa1b71472f00cdc

Building wheel for ansible-base (setup.py) … done

Created wheel for ansible-base: filename=ansible_base-2.10.5-py3-none-any.whl size=1870022 sha256=6bd3451d7e362da79273544a93b7d6209e25798d854d903c836f956d9e745c45

Stored in directory: /Users/Jorayala/Library/Caches/pip/wheels/42/c6/0c/3a4ca90e8116f3d585dff14283e48a6db9982d3f520654c46d

Successfully built ansible ansible-base

Installing collected packages: pycparser, pyparsing, MarkupSafe, cffi, PyYAML, packaging, jinja2, cryptography, ansible-base, ansible

Successfully installed MarkupSafe-1.1.1 PyYAML-5.4.1 ansible-2.10.6 ansible-base-2.10.5 cffi-1.14.4 cryptography-3.3.1 jinja2-2.11.2 packaging-20.8 pycparser-2.20 pyparsing-2.4.7

Jorayala@JORAYALA-M-JFTV ~ % python3 -m pip install --user paramiko

Collecting paramiko

Downloading paramiko-2.7.2-py2.py3-none-any.whl (206 kB)

████████████████████████████████| 206 kB 497 kB/s

Collecting pynacl>=1.0.1

Downloading PyNaCl-1.4.0-cp35-abi3-macosx_10_10_x86_64.whl (380 kB)

████████████████████████████████| 380 kB 2.8 MB/s

Requirement already satisfied: cryptography>=2.5 in ./Library/Python/3.8/lib/python/site-packages (from paramiko) (3.3.1)

Collecting bcrypt>=3.1.3

Downloading bcrypt-3.2.0-cp36-abi3-macosx_10_9_x86_64.whl (31 kB)

Requirement already satisfied: six>=1.4.1 in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages (from bcrypt>=3.1.3->paramiko) (1.15.0)

Requirement already satisfied: cffi>=1.1 in ./Library/Python/3.8/lib/python/site-packages (from bcrypt>=3.1.3->paramiko) (1.14.4)

Requirement already satisfied: pycparser in ./Library/Python/3.8/lib/python/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko) (2.20)

Installing collected packages: pynacl, bcrypt, paramiko

Successfully installed bcrypt-3.2.0 paramiko-2.7.2 pynacl-1.4.0

Jorayala@JORAYALA-M-JFTV ~ % ansible --version

zsh: command not found: ansible

thanks

Hi

When a command is not found the reason usually is that it is not in a directory which is in the PATH variable. Though the reason could also be that the application was simply not there before and if you open up a new terminal window and try again it will work. If it does not you have to append the PATH variable.
You can see which directories are in your PATH variable with the command “echo $PATH”. The individual directory paths are separated with a colon.
In order to add a path I recommend editing your .zshrc file which is in your home directory. Use your prefered editor to open the file, for example “vim ~/.zshrc” or “nano ~/.zshrc”. The ~ character is a shorthand for you home directory in your case you can also type “nano /Users/Jorayala/.zshrc”. In this file you have to edit the line that looks like this or similar:
export PATH=$HOME/bin:/usr/local/bin:/usr/local/sbin:$PATH

Somewhere in between the variables $HOME (if you even have it in there) and $PATH you can add the path to your ansible installation but make sure to have a colon before and at the end of your path and don’t mess up the existing paths. So after a colon type your path and add a colon to separate it from the next path. Save that file and close the terminal window. This new path setting will only activate once you open up a new terminal window.

Best,
Cyril