title: Cython Library not loaded: @rpath/libpython3.8.dylib
body: <p>I'm trying to follow this <a href="http://masnun.rocks/2016/10/01/creating-an-executable-file-using-cython/" rel="nofollow noreferrer">seemingly simple tutorial</a> on how to make an executable using Cython.</p>
  
  <p>The python file I'm using contains the following:</p>
  
  <pre><code>#cython: language_level=3
  print("hello world")
  </code></pre>
  
  <p>I compiled this file into a .c file by running the following command:</p>
  
  <pre><code>cython --embed test.pyx
  </code></pre>
  
  <p>I compiled the program with these arguments.</p>
  
  <pre><code>gcc -Os -I /usr/local/Caskroom/miniconda/base/envs/cython_test/include/python3.8 -L /usr/local/Caskroom/miniconda/base/envs/cython_test/lib -lpython3.8 test.c -o test
  </code></pre>
  
  <p>However, after compiling the program, and attempting to run it, I receive this error.</p>
  
  <pre><code>dyld: Library not loaded: @rpath/libpython3.8.dylib
     Referenced from: ./test
     Reason: image not found
  Abort trap: 6
  </code></pre>
  
  <p>I was able to successfully compile and run the executable using a non-conda python environment of python 3.7, so that leads me to believe that the library files that came with my conda environment are having an effect here.</p>