For openSUSE Tumbleweed run the following as root:
zypper addrepo https://download.opensuse.org/repositories/openSUSE:Tools/openSUSE_Tumbleweed/openSUSE:Tools.repo
zypper refresh
zypper install python-PyYAML
For openSUSE Factory run the following as root:
zypper addrepo https://download.opensuse.org/repositories/openSUSE:Tools/openSUSE_Factory/openSUSE:Tools.repo
zypper refresh
zypper install python-PyYAML
For 15.7 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/openSUSE:Tools/15.7/openSUSE:Tools.repo
zypper refresh
zypper install python-PyYAML
For 15.6 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/openSUSE:Tools/15.6/openSUSE:Tools.repo
zypper refresh
zypper install python-PyYAML
For 15.5 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/openSUSE:Tools/15.5/openSUSE:Tools.repo
zypper refresh
zypper install python-PyYAML