title: Best way to install python packages locally for development
body: <p>Being new to the python games I seem to have missed out on some knowledge on how you can develop on a program but also keep it in your live environment.</p>
  
  <p>Programs like gpodder can be run directly from the source checkout which is really handy  however others want to be "installed" to run.</p>
  
  <p>A lot of programs are distributed with a setup.py with instructions to run "python ./setup.py install" as root which will put stuff somewhere in your file-system. There are even install commands like "develop" which seem to hold the promise of what I want. So I tried:</p>
  
  <pre><code>export PYTHONPATH=/home/alex/python
  python ./setup.py develop --install-dir=/home/alex/python
  </code></pre>
  
  <p>Which downloaded a bunch of stuff locally and seems magically ensure the application I'm hacking on is still being run out of the src tree. So I guess my roundabout question is is this the correct way of developing python code? How do things like easy_install and pip factor into this?</p>
  
  <p>So I tried the following:</p>
  
  <pre><code> python /usr/share/pyshared/virtualenv.py /home/alex/src/goobook
   cd /home/alex/src/goobook/googbook.git
   /home/alex/src/goobook/bin/python ./setup.py develop
  </code></pre>
  
  <p>And finally linked the program in question to my ~/bin</p>
  
  <pre><code> cd /home/alex/src/goobook
   linkbin.pl bin/goobook
  </code></pre>
  
  <p>However invocation throws up a load of extra chatter which seems to imply it's wrong:</p>
  
  <pre><code>
  17:17 alex@socrates/i686 [goobook] >goobook --help
  /home/alex/bin/goobook:5: UserWarning: Module pkg_resources was already imported from        /home/alex/src/goobook/lib/python2.5/site-packages/setuptools-0.6c8-py2.5.egg/pkg_resources.py, but /home/alex/src/goobook/lib/python2.5/site-packages/distribute-0.6.10-py2.5.egg is being added to sys.path
    from pkg_resources import load_entry_point
  /home/alex/bin/goobook:5: UserWarning: Module site was already imported from /home/alex/src/goobook/lib/python2.5/site.pyc, but /home/alex/src/goobook/lib/python2.5/site-packages/distribute-0.6.10-py2.5.egg is being added to sys.path
    from pkg_resources import load_entry_point
  </code>
  </pre>