Mac OS X error: directory that is not on PYTHONPATH and which Python does not read ".pth" files from
<p>I'm getting an error while trying to install FEnicS on Mac OS X 10.11.6. I've read the responses to similar questions on this website, and have tried the suggested solutions, but I must be doing something wrong. </p>

<p>On running the command:</p>

<pre><code>curl -s https://fenicsproject.org/fenics-install.sh | bash
</code></pre>

<p>I get an error while the cython package is being installed:</p>



<pre><code>[cython] Building cython/e2t4ieqlgjl3, follow log with:  
[cython]   tail -f /Users/sophiaw/.hashdist/tmp/cython-e2t4ieqlgjl3-1/_hashdist/build.log
[cython|ERROR] Command '[u'/bin/bash', '_hashdist/build.sh']' returned non-zero exit status 1
[cython|ERROR] command failed (code=1); raising.
</code></pre>

<p>The message from build.log is:</p>

<blockquote>
  <p>Checking .pth file support in
  /Users/sophiaw/.hashdist/bld/cython/e2t4ieqlgjl3/lib/python2.7/site-packages/
  /Users/sophiaw/.hashdist/bld/python/pf77qttkbtzn/bin/python -E -c pass</p>
  
  <p>TEST FAILED:
  /Users/sophiaw/.hashdist/bld/cython/e2t4ieqlgjl3/lib/python2.7/site-packages/
  does NOT support .pth files  error: bad install directory or
  PYTHONPATH</p>
  
  <p>You are attempting to install a package to a directory that is not on
  PYTHONPATH and which Python does not read ".pth" files from.  The
  installation directory you specified (via --install-dir, --prefix, or
  the distutils default setting) was:</p>
  
  <p>/Users/sophiaw/.hashdist/bld/cython/e2t4ieqlgjl3/lib/python2.7/site-packages/</p>
  
  <p>and your PYTHONPATH environment variable currently contains: 
  '/Users/sophiaw/.hashdist/bld/cython/e2t4ieqlgjl3/Python.framework/Versions/2.7/lib/python2.7/site-packages:'</p>
  
  <p>Here are some of your options for correcting the problem:</p>
  
  <ul>
  <li><p>You can choose a different installation directory, i.e., one that is on PYTHONPATH or supports .pth files</p></li>
  <li><p>You can add the installation directory to the PYTHONPATH environment variable.  (It must then also be on PYTHONPATH whenever you run Python
  and want to use the package(s) you are installing.)</p></li>
  <li><p>You can set up the installation directory to support ".pth" files by  using one of the approaches described here:</p></li>
  </ul>
  
  <p><a href="https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations" rel="nofollow">https://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations</a></p>
  
  <p>Please make the appropriate changes for your system and try again.</p>
</blockquote>

<p>I've tried adding this to the bash_profile, but get the same error:</p>



<pre><code>export PYTHONPATH=/Users/sophiaw/.hashdist/bld/cython/e2t4ieqlgjl3/lib/python2.7/site-packages:$PYTHONPATH.
</code></pre>

<p>How can I fix this error?</p>

<p>This was resolved by the fenics support group. to install FEniCS on OS X, Docker is a more convenient option.</p>

python osx python-2.7 pythonpath pth