[SciPy-Dev] Installing multiple scipy versions for development
Fri Dec 28 17:44:31 CST 2012
On 28 Dec 2012 22:09, "Alexander Löw" <firstname.lastname@example.org> wrote:
> I am a newbie to scipy development, thus sorry, if the following
> question might sound stupid for some of you:
> What is best practice to install multiple scipy versions on my machine
> for local development?
> I run python under Ubuntu and have general python 2.7 installed together
> with scipy 0.10.1.
> I recently checked out the recent scipy source code. Now I want to be
> able to switch easily between the developer version of scipy and the
> stable code. How can I do this? I did not find anything in the Wiki. I
> guess I would need to change some PATH variables during by session, but
The standard solution for this in python is a tool called "virtualenv":
Just apt-get install virtualenv, and then you can do:
to create a new isolated python environment in a directory called 'myenv'
using the default python version. Now you can run
to get a shell, and to install things into that environment you do
myenv/bin/pip install <pkgname>
myenv/bin/python setup.py install
Or just do
to automatically switch your PATH around to use that environment by default
for the current shell session and then run 'python', 'pip', etc as normal;
just type 'deactivate' to turn it off again. Pretty simple! If you want to
throw that environment away and start over, just delete the directory.
By default your new environment will contain *only* the standard library.
If you want it to inherit all the packages you have installed systemwide,
use the --system-site-packages option. (You can still override specific
packages in the virtualenv by installing the version you want there. This
is handy if you don't want to e.g. recompile numpy.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-Dev