title: No module 'yum' on Python 3 on CentOS 7
body: <p>I'm trying to use the <a href="http://yum.baseurl.org/api/yum/yum/__init__.html" rel="nofollow noreferrer">yum Python package</a> in CentOS 7.</p>
  
  <p>In <strong>Python 2</strong>: I can successfully <code>import yum</code>.</p>
  
  <p>In <strong>Python 3</strong>: When I try to <code>import yum</code>, I encounter <code>ModuleNotFoundError: No module named 'yum'</code>.</p>
  
  <p>The exact same issue occurs with the <a href="https://dnf.readthedocs.io/en/latest/api.html" rel="nofollow noreferrer">dnf Python package</a> after I install dnf.</p>
  
  <p>Researching around the issue took me to CentOS 8, where <code>dnf</code> package does work on Python 3.
  When trying to find <code>python3-dnf</code> package (or the equivalent one for <code>yum</code>) in CentOS 7.
  Trying to install CentOS 8 packages on CentOS 7 only led me to conflicts and mismatches with required packages.</p>
  
  <p>Also, trying to <code>pip3 install yum</code> does not find any package, and <code>pip3 install dnf</code> succeeds but importing gives the following warning:</p>
  
  <pre><code>/usr/local/lib/python3.6/site-packages/dnf.py:15: UserWarning: The DNF Python API is not currently available via PyPI.
  
  Please install it with your distro package manager (typically called
  'python2-dnf' or 'python3-dnf'), and ensure that any virtual environments
  needing the API are configured to be able to see the system site packages
  directory.
  
    warnings.warn(warning_msg)
  </code></pre>
  
  <p>So, currently I can't find a way to interact natively with <code>yum</code>/<code>dnf</code> with Python code, running Python 3 on CentOS 7.</p>