[IPython-user] IPython w different Pythons

Fernando Perez Fernando.Perez at colorado.edu
Mon Aug 15 16:00:13 CDT 2005

Alan G Isaac wrote:
> On Fri, 12 Aug 2005, Fernando Perez apparently wrote: 
>>You can just unpack the .tgz and do: 
>>/path/to/python2.4 setup.py install --install-scripts=/tmp/something/ 
>>This will dump the execution script which points to py2.4 into /tmp/something, 
>>so it doesn't overwrite your default one in /usr/bin.  You can then do 
>>mv /tmp/something/ipython /usr/bin/ipython2.4 
>>An alternative is to keep the IPython directory somewhere in your $PYTHONPATH, 
>>and have two aliases 
>>ipython23 = python2.3 /path/to/ipython/scripts/ipython 
>>ipython24 = python2.4 /path/to/ipython/scripts/ipython 
>>This one will allow you to use the same install from both python versions. 
> Trying to translate the latter to Windows ...
> I see that my original IPython installation created 
> a shortcut with target
> C:\Python23\python.exe "C:\Program 
> Files\IPython\IPython_shell.py"
> I think you are saying that changing this to
> C:\Python24\python.exe "C:\Program Files\IPython\IPython_shell.py"
> should work as long as I add an %PYTHONPATH environment 
> variable that points to "C:\Program Files\IPython".
> Is that about right?

That's about right, as long as C:\Program Files\IPython contains the actual 
ipython module files (*py/pyc).  I don't think that's the case, though: a 
normal install will put those into the win32 equivalent of 
/usr/lib/python2.X/site-packages/IPython.  Since ipython is pure python, you 
can just copy that whole directory somewhere in your $PYTHONPATH.  Note that 
PYTHONPATH does NOT need to contain foo\IPython, but only foo\, since IPYthon 
itself is a proper python package (with an __init__.py file).

Let me know if this is not enough, and I'll try to narrow it better.  Not 
knowing the win32 filesystem layout means I'm shooting a bit in the dark here, 
so my advice is unfortunately somewhat vague.



More information about the IPython-user mailing list