title: zsh: /usr/local/bin/youtube-dl: bad interpreter: /usr/local/opt/python/bin/python2.7: no such file or directory
body: <p>macOS 10.12</p>
  
  <p>Seems like the same problem <a href="https://stackoverflow.com/questions/31768128/pip-installation-usr-local-opt-python-bin-python2-7-bad-interpreter-no-such-f?utm_medium=organic&amp;utm_source=google_rich_qa&amp;utm_campaign=google_rich_qa">here</a> but top answers just led to more questions. </p>
  
  <p><a href="https://stackoverflow.com/a/33872341/1757149">Top answer</a> says to do:</p>
  
  <p><code>brew link --overwrite python</code></p>
  
  <p>which yields: </p>
  
  <pre><code>Warning: Already linked: /usr/local/Cellar/python/3.6.5
  To relink: brew unlink python &amp;&amp; brew link python
  </code></pre>
  
  <p>I'm pretty sure I need to get homebrew to switch to 2.7 rather than using version 3. I do</p>
  
  <p><code>brew unlink python &amp;&amp; brew link python</code></p>
  
  <p>and get:</p>
  
  <pre><code>Unlinking /usr/local/Cellar/python/3.6.5... 25 symlinks removed
  Linking /usr/local/Cellar/python/3.6.5... 25 symlinks created
  </code></pre>
  
  <p>Is there a way I can tell it to link to a specific version? <code>/usr/local/Cellar/python/</code> contains: <code>2.7.13   2.7.14   2.7.14_3 3.6.3    3.6.5</code></p>
  
  <p><strong>How can I get my system to always use <code>2.7.14_3</code>?</strong></p>
  
  <p><code>/usr/local/opt/python/bin</code> contains <code>python3</code>, <code>python3-config</code>, and 3.6 versions. How can I get 2.7 in here and remove 3 and 3.6?</p>
  
  <p>Also <code>which python</code> returns <code>/usr/bin/python</code>. When I type <code>python -V</code> I get <code>Python 2.7.10</code>. <code>/usr/bin</code> contains <code>python2.7</code>, <code>python2.7-config</code> as well as some other seemingly-python-related things (but no python3, which is good I think). Is this different from homebrew pythons? Thanks in advance. </p>
  
  <p><em>Edit:</em></p>
  
  <p><a href="https://stackoverflow.com/a/31769149/1757149">Second-to-top answer</a> says to do <code>head -n1 /usr/local/bin/pip</code> which returns </p>
  
  <p><code>head: /usr/local/bin/pip: No such file or directory</code></p>
  
  <p>and </p>
  
  <p><code>mv /usr/local/bin/pip /usr/local/bin/pip.old</code> </p>
  
  <p>returns </p>
  
  <p><code>mv: rename /usr/local/bin/pip to /usr/local/bin/pip.old: No such file or directory</code></p>