In the same way, you can install pyyaml on macOS in four steps: Open your macOS terminal. Now that you know a particular package name, you can install it: You may also use aptitude or yum: There are three YAML compliant packages available. The py script checks whether LibYAML is enabled and if so, creates and installs LibYAML bindings.