title: Installing Mercurial on Mac OS X 10.6 Snow Leopard
body: <h1>Installing Mercurial on Mac OS X 10.6 Snow Leopard</h1>
  
  <p>I installed Mercurial 1.3.1 on Mac OS X 10.6 Snow Leopard from source using the following:</p>
  
  <pre><code>cd ~/src
  curl -O https://www.mercurial-scm.org/release/mercurial-1.3.1.tar.gz
  tar -xzvf mercurial-1.3.1.tar.gz
  cd mercurial-1.3.1
  make all
  sudo make install
  </code></pre>
  
  <p>This installs the site-packages files for Mercurial in <code>/usr/local/lib/python2.6/site-packages/</code>. I know that installing Mercurial from the Mac Disk Image will install the files into <code>/Library/Python/2.6/site-packages/</code>, which is the site-packages directory for the Mac OS X default Python install.</p>
  
  <p>I have Python 2.6.2+ installed as a Framework with its site-packages directory in:</p>
  
  <blockquote>
    <p>/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages</p>
  </blockquote>
  
  <p>With Mercurial installed this way, I have to issue:</p>
  
  <blockquote>
    <p>PYTHONPATH=/usr/local/lib/python2.6/site-packages:"${PYTHONPATH}"</p>
  </blockquote>
  
  <p>in order to get Mercurial to work.</p>
  
  <h3>Questions</h3>
  
  <ul>
  <li>How can I install Mercurial from source with the site-packages in a different directory?</li>
  <li>Is there an advantage or disadvantage to having the site-packages in the current location? Would it be better in one of the Python site-package directories that already exist?</li>
  <li>Do I need to be concerned about virtualenv working correctly since I have modified PYTHONPATH (or any other conflicts for that matter)?</li>
  </ul>
  
  <h3>Reasons for Installing from Source</h3>
  
  <p><a href="http://hivelogic.com/about" rel="nofollow noreferrer">Dan Benjamin</a> of <a href="http://hivelogic.com/" rel="nofollow noreferrer">Hivelogic</a> provides the benefits of and instructions for installing Mercurial from source in his article <a href="http://hivelogic.com/articles/compiling-mercurial-on-snow-leopard/" rel="nofollow noreferrer">Installing Mercurial on Snow Leopard</a>.</p>