title: Python3.7 'No module named apt_pkg' error on Linux Mint 19
body: <p>When I attempt to run some test code my professor gave me using Python3.7 on Linux Mint 19 I get the following error</p>
  
  <pre><code>RuntimeError: Bad code object in .pyc file
  Error in sys.excepthook:
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
      from apport.fileutils import likely_packaged, get_recent_crashes
    File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in &lt;module&gt;
      from apport.report import Report
    File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in &lt;module&gt;
      import apport.fileutils
    File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in &lt;module&gt;
      from apport.packaging_impl import impl as packaging
    File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in &lt;module&gt;
      import apt
    File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in &lt;module&gt;
      import apt_pkg
  ModuleNotFoundError: No module named 'apt_pkg'
  
  Original exception was:
  RuntimeError: Bad code object in .pyc file
  </code></pre>
  
  <p>At first, I only installed Python3.7 minimal and this error didn't occur, but I needed to install the full version of Python3.7 to use some modules that come with it, and that started this error. I already tried installing Python3.7 dev and it did nothing. I also tried</p>
  
  <pre><code>sudo apt-get remove --purge python3.7-apt
  </code></pre>
  
  <p>and it said it couldn't even find apt. So I tried </p>
  
  <pre><code>sudo apt-get install python3.7-apt
  </code></pre>
  
  <p>and it couldn't even find the package. I also tried installing python3-apt and it did nothing. I would uninstall python3-apt first but apparently that could harm the OS because Mint uses Python3.6 internally. Any help resolving this would be much appreciated!</p>