title: Python3 import error: No module named 'rpm'
body: <p>On a CentOS 7 I have installed python3 with the following command:</p>
  <pre><code>yum install -y python3
  </code></pre>
  <p>However, when I call <code>import rpm</code>, I get this error:</p>
  <pre><code>File &quot;\&lt;stdin&gt;&quot;, line 1, in \&lt;module&gt;
  ModuleNotFoundError: No module named 'rpm'
  </code></pre>
  <p>So how do I import the python3 rpm module?</p>
  <p>Running <code>rpm --version</code> returns</p>
  <pre><code>RPM version 4.11.3
  </code></pre>
  <p>Accessing python (2.7.5) and running the import command works. So I could call a python2 script from python 3, as described <a href="https://stackoverflow.com/questions/27863832/calling-python-2-script-from-python-3">here</a> but this just feels wrong.</p>
  <p>There are similar questions to this but they all relate to the rpm module being unavailable from Python2 and I don't have that problem. None deal with making the rpm module available in Python3.</p>