Version 2 (modified by spascoe, 13 years ago) (diff)



Sometimes easy_install doesn't seem so easy. Maybe you don't have full control of your python environment because you don't have root access. Maybe you don't have setuptools installed. The tool  virtualenv allows you to create isolated python environments where you can easy_install anything you want. It also allows you to create custom install scripts for putting packages in your virtualenv.

I've used this feature to create a script that will download cdat_lite and csml into their own virtualenv. This should work even if you don't have root access to the machine you are using. You don't need to run to get setuptools and you definitely don't need to install virtualenv.

The bootstrap script can be downloaded from It requires a few things to work:

  1. Python 2.5+. This is needed for cdat_lite-5.0
  2. distutils. If your system python doesn't have this module you will need to install the python development package with your system's package manager.
  3. NetCDF Libraries. If they aren't in a standard location set NETCDF_HOME.

Now just do:

> python csml_home
New python executable in csml_home/bin/python

You see lots of compile output and should then have your own python executable with access to csml and cdat_lite

> csml_home/bin/python
Python 2.5.1 (r251:54863, Jul 31 2008, 22:53:39)
[GCC 4.1.2 (Ubuntu 4.1.2-0ubuntu4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cdms2
>>> import csml
NASAAmes interface not available. CSML will still work, but won't support NASA Ames files

As you can see nappy isn't included yet. However, once nappy is fully eggable it could be downloaded by the bootstrap script to.