Describe the bug
When following the steps in Install Azure CLI with yum for a RHEL 8 Beta machine, a series of errors stating that nothing provides python needed by azure-cli-2.0.16 through azure-cli-2.0.51 is displayed (see screenshot).
This RPM does not work for RHEL 8 because it is attempting to find python. RHEL 8 provides python2 and python3, not simply python.
To Reproduce
Expected behavior
The latest Azure CLI is installed successfully on a RHEL 8 Beta machine.
Environment summary
Additional context
This is likely because no Azure RPM(s) exist for RHEL 8 yet. The currently available azure-cli RPM does not work for RHEL 8 because it is attempting to find python. RHEL 8 provides python2 and python3. Note that python2 works for both RHEL7/RHEL6.

RHEL 8 is still only in beta, and for that reason I'm going to mark this as low-priority. However, it is something we're going to have to address for each of the distros that we support as they deal with python2 being deprecated.
It's still a while away, but so that people are aware, looks there are breaking changes with Python in RHEL8 (and expect Centos8 to follow suite):
6.4.4. Handling hashbangs in Python scripts
In Red Hat Enterprise Linux 8, executable Python scripts are expected to use hashbangs (shebangs) > specifying explicitly at least the major Python version.
There is a statement about "attempt to fix hashbangs when building RPMs, so maybe all not too bad. It looks a bit confusing to me though (I've opened an issue to clarify this in RH portal):
The /usr/lib/rpm/redhat/brp-mangle-shebangs buildroot policy (BRP) script is run automatically when building any RPM package, and attempts to correct hashbangs in all executable files.
The BRP script will generate errors when encountering a Python script with an ambiguous hashbang, > such as:
#! /usr/bin/pythonor
#! /usr/bin/env python
Source: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8-beta/html-single/configuring_basic_system_settings/#python-shebang-mangling
I'm rolling up this and a few other RPM related issues into the broader #8780.
Work around found on Red Hat (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/deploying_red_hat_enterprise_linux_8_on_public_cloud_platforms/index) seems to work:
$ sudo yum install python2
$ sudo yumdownloader azure-cli
$ sudo rpm -ivh --nodeps azure-cli-2.0.64-1.el7.x86_64.rpm
Most helpful comment
Work around found on Red Hat (https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/deploying_red_hat_enterprise_linux_8_on_public_cloud_platforms/index) seems to work:
$ sudo yum install python2
$ sudo yumdownloader azure-cli
$ sudo rpm -ivh --nodeps azure-cli-2.0.64-1.el7.x86_64.rpm