title: Broken python dependencies on an Ubuntu 16.04 (AWS EC2)
body: <p>I attempted to remove all installed python on my Ubuntu 16.04 .As it stands, I now understand I should not have done that. However, just trying to reinstall python doesn't work.  </p>
  
  <p>When I try</p>
  
  <pre><code>$ sudo apt install -f --reinstall python3
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  Suggested packages:
    python3-doc python3-tk python3-venv
  The following NEW packages will be installed:
    python3
  0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
  4 not fully installed or removed.
  Need to get 0 B/8,710 B of archives.
  After this operation, 68.6 kB of additional disk space will be used.
  Setting up python3.5-minimal (3.5.2-2ubuntu0~16.04.5) ...
  # Empty sitecustomize.py to avoid a dangling symlink
  Could not find platform independent libraries &lt;prefix&gt;
  Consider setting $PYTHONHOME to &lt;prefix&gt;[:&lt;exec_prefix&gt;]
  Fatal Python error: Py_Initialize: Unable to get the locale encoding
  ImportError: No module named 'encodings'
  
  Current thread 0x00007fc6b52dd700 (most recent call first):
  Aborted
  dpkg: error processing package python3.5-minimal (--configure):
   subprocess installed post-installation script returned error exit status 134
  dpkg: dependency problems prevent configuration of python3-minimal:
   python3-minimal depends on python3.5-minimal (&gt;= 3.5.1-2~); however:
    Package python3.5-minimal is not configured yet.
  
  dpkg: error processing package python3-minimal (--configure):
   dependency problems - leaving unconfigured
  Errors were encountered while processing:
   python3.5-minimal
   python3-minimal
  E: Sub-process /usr/bin/dpkg returned an error code (1)
  
  $ python3
  Could not find platform independent libraries &lt;prefix&gt;
  Consider setting $PYTHONHOME to &lt;prefix&gt;[:&lt;exec_prefix&gt;]
  Fatal Python error: Py_Initialize: Unable to get the locale encoding
  ImportError: No module named 'encodings'
  
  Current thread 0x00007f87215c4700 (most recent call first):
  Aborted
  
  </code></pre>
  
  <p>I tried installing some of the dependencies, I noticed were missing to no avail </p>
  
  <pre><code>$ sudo apt-get -f install python3.5-minimal
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  python3.5-minimal is already the newest version (3.5.2-2ubuntu0~16.04.5).
  You might want to run 'apt-get -f install' to correct these:
  The following packages have unmet dependencies:
   dh-python : Depends: python3:any (&gt;= 3.3.2-2~)
  E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
  </code></pre>
  
  <p>Have tried different things but at this point I am lost as to how to go about this problem</p>
  
  <pre><code>$ sudo apt-get -f install dh-python
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  dh-python is already the newest version (2.20151103ubuntu1.1).
  You might want to run 'apt-get -f install' to correct these:
  The following packages have unmet dependencies:
   dh-python : Depends: python3:any (&gt;= 3.3.2-2~)
  E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
  </code></pre>