On Apr 7, 2010, at 4:56 PM, Igor wrote:

> How can I use two fipy versions at one PC?
> 
> I work on Linux machine without root rights and there is fipy 2.0.2
> installed under python2.6. I'd like to test  fipy 2.1 from my home.
> 
> How should I tell my scripts running with python2.6 to use home-based
> distribution?
> Do I have to update/install to my home any other packages already
> present at my PC and used by fipy v2.0.2, which is installed globally?


I strongly advise the use of virtualenv and virtualenvwrapper to manage this 
sort of thing. There are other solutions (stow, etc.), but virtualenv is python 
based and works well for exactly this issue.

  http://pypi.python.org/pypi/virtualenv
  http://www.doughellmann.com/projects/virtualenvwrapper/


Using virtualenvwrapper, you could then clone your current installation:

  mkvirtualenv --distribute fipy210

obtain FiPy 2.1 in whichever way you prefer, unpack if needed, 

  cd FiPy2.1
  python setup.py install

Now, whenever you want to use FiPy 2.1, you can open a shell and type

  workon fipy210

and if you want to shift back, you can either type

  deactivate

or just open a clean shell. If you want to be really clean about it you can do

  mkvirtualenv --distribute fipy202

and then shift back and forth with

  workon fipy202
  workon fipy210


I think you can share all of FiPy's prerequisites between FiPy 2.0 and FiPy 
2.1, with the exception of Mayavi. FiPy 2.0 needs MayaVi 1.x and FiPy 2.1 needs 
Mayavi 2.x. These can be separately installed in your virtualenv's, or they 
might both be installed system-wide. My impressions is that their namespaces 
don't conflict, but I'm not positive.


I am presently writing up instructions of Mac OS X 10.6 that allow you to build 
a complete FiPy installation with very little use of sudo. Much of it should 
extrapolate to Linux and some of the things that you need to sudo on a Mac are 
probably already part of your Linux distribution. It's a work in progress, but 
you can see what I have so far at

  http://matforge.org/fipy/wiki/SnowLeopardSourceBuild




Reply via email to