title: python embedding on Mac ModuleNotFoundError: No module named 'encodings'
body: <p>I'm currently unable to using the Cython embedding feature. The binary compiles fine and <code>otool -L embedded</code> returns the following results.</p>
  
  <pre><code>embedded:
          @rpath/libpython3.6m.dylib (compatibility version 3.6.0, current version 3.6.0)
          /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
  
  /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1349.8.0)
  </code></pre>
  
  <p>This is the command I ran. Any thoughts on why this is not working? Cython using setup.py works fine when I want to create a Cython module, i.e. I'm able to import the Cython module in Python.</p>
  
  <pre><code>$ make
  
  gcc -c embedded.c -I/Users/$USER/miniconda3/include/python3.6m -I/Users/$USER/miniconda3/include/python3.6m
  gcc -o embedded embedded.o -L/Users/$USER/miniconda3/lib -L/Users/$USER/miniconda3/lib/python3.6/config-3.6m-darwin -lpython3.6m -ldl  -framework CoreFoundation  -Wl,-stack_size,1000000  -framework CoreFoundation
  
  $ ./embedded
  
  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 load the file system codec
  ModuleNotFoundError: No module named 'encodings'
  
  Current thread 0x000000010f8113c0 (most recent call first):
  [1]    32931 abort      ./embedded
  </code></pre>
  
  <p>Suggestions?</p>