title: Python paths not being set on embedded installation
body: <p>I am trying to get python3 running on my EspressoBin single board computer (aarch64). I have built a linux distribution using Marvell's <a href="https://github.com/MarvellEmbeddedProcessors/marvell-embedded-linux-platform" rel="nofollow noreferrer">openembedded</a> distribution and included <code>python3</code>.</p>
  
  <p>The problem is that python's search paths/environment variables are not being set. </p>
  
  <p>If I try to start python3, I get:</p>
  
  <pre><code>Could not find platform independent libraries &lt;prefix&gt;
  Could not find platform dependent libraries &lt;exec_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 0x0000007faef06000 (most recent call first):
  Aborted
  </code></pre>
  
  <p>If, however, I do:</p>
  
  <pre><code>$ export PYTHONHOME="/usr/lib64/python3.5/"
  $ export PYTHONPATH="/usr/lib64/python3.5/:/usr/lib64/python3.5/lib-dynload"
  $ python3
  Python 3.5.1 (default, Jan 14 2019, 23:24:54) 
  [GCC 5.3.0] on linux
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt;
  </code></pre>
  
  <p>Then everything magically works.</p>
  
  <p>So the question is... where/how are these things normally being set? I tried comparing to Ubuntu, but for some reason those environment variables aren't even present at all! I checked the docs on <a href="https://docs.python.org/3/library/sys.html#sys.path" rel="nofollow noreferrer">sys.path</a> and it says that <code>sys.path</code> is populated from PYTHONPATH, "plus an installation-dependent default". So I'm guessing Ubuntu's "installation-dependent default" has the correct paths pre-populated?</p>
  
  <p>My current solution is to just add those two environment variables to <code>/etc/environment</code>, as well as <code>/etc/profile</code> (for ssh connections), but this seems like a hacky workaround and I want to do it right.</p>