I have just out-clevered myself using setuptools and virtualenv:
* install foo using "python setup.py develop" (foo being ipython).
* download some module bar you want to work on in an isolated environment
* create this isolated environment using "virtualenv bar"
* in the isolated environment "python setup.py develop" the bar module.
* still in the isolated environment, try to import bar in a script installed by foo (aka ipython)
--> fails because foo uses the system python, and virtualenv wants you to use its own python
One very easy solution to make this work is to have the setuptools generated scripts use, under unices, "#!/usr/bin/env python" rather than "#!/usr/bin/python". This seems to me like a good solution, in general, to follow the user's expectations.
Is this a change that would be possible?