[SciPy-Dev] Installing multiple scipy versions for development

Nathaniel Smith njs@pobox....
Fri Dec 28 17:44:31 CST 2012


On 28 Dec 2012 22:09, "Alexander Löw" <a.loew@gmx.net> wrote:
>
> Hi,
>
> 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
how?

The standard solution for this in python is a tool called "virtualenv":
  http://www.virtualenv.org

Just apt-get install virtualenv, and then you can do:
  virtualenv myenv
to create a new isolated python environment in a directory called 'myenv'
using the default python version. Now you can run
  myenv/bin/python
to get a shell, and to install things into that environment you do
  myenv/bin/pip install <pkgname>
or
  myenv/bin/python setup.py install
Or just do
  source myenv/bin/activate
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.)

-n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20121228/82e65754/attachment.html 


More information about the SciPy-Dev mailing list