Changes between Version 3 and Version 4 of CowsFramework/CowsInstallation/CowsPython2.6


Ignore:
Timestamp:
24/09/10 12:47:58 (10 years ago)
Author:
astephen
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CowsFramework/CowsInstallation/CowsPython2.6

    v3 v4  
    1313== Installing COWS server dependencies == 
    1414 
    15 The COWS Server compatible with Pylons 1.0 and Python 2.6 has the following dependencies: 
    16  
    17 ***PUT DEPENDENCIES HERE*** 
    18  
    19 == COWS Server installation == 
    20  
    21 These instructions suggest installing the COWS server into a [wiki:http://pypi.python.org/pypi/virtualenv virtualenv] self-contained python environment. They also suggest the use of [wiki:http://pypi.python.org/pypi/pip pip] as the installation tool. Alternatively, buildout can be used. 
     15The COWS Server compatible with Pylons 1.0 and Python 2.6 has the following dependencies. This list was produced using the 
     16{{{pip freeze}}} tool: 
     17 
     18{{{ 
     19Beaker==1.5.4 
     20FormEncode==1.2.3dev 
     21Genshi==0.6 
     22Mako==0.3.4 
     23MarkupSafe==0.11 
     24OWSLib==0.3.1 
     25PIL==1.1.7 
     26Paste==1.7.5.1 
     27PasteDeploy==1.3.4 
     28PasteScript==1.7.3 
     29Pygments==1.3.1 
     30Pylons==1.0 
     31Routes==1.12.3 
     32Shapely==1.2.5 
     33Tempita==0.5dev 
     34WebError==0.10.2 
     35WebHelpers==1.2 
     36WebOb==1.0 
     37WebTest==1.2.2 
     38basemap==1.0 
     39cdat-lite==5.2-1 
     40-e svn+http://astephen@proj.badc.rl.ac.uk/svn/ndg/cows/branches/migrate-py26-pylons10@7492#egg=cows-1.5.1_r7492-py2.6-migrate-py26-pylons10-r7492 
     41-e svn+http://astephen@proj.badc.rl.ac.uk/svn/ndg/cowsclient/branches/migrate-py26-pylons10@7502#egg=cowsclient-1.5.1_r7502-py2.6-migrate-py26-pylons10-r7502 
     42-e svn+http://astephen@proj.badc.rl.ac.uk/svn/ndg/cowsserver/branches/migrate-py26-pylons10@7490#egg=cowsserver-1.5.1_r7490-py2.6-migrate-py26-pylons10-r7490 
     43csml==2.7.13 
     44decorator==3.2.0 
     45-e svn+http://astephen@proj.badc.rl.ac.uk/svn/ndg/qesdi/geoplot/trunk@6519#egg=geoplot-0.3.3_r6540-py2.6-dev_r6519 
     46-e svn+http://astephen@proj.badc.rl.ac.uk/svn/ndg/qesdi/image_utils/trunk@5700#egg=image_utils-1.0_r5700-py2.6-dev_r5700 
     47libxml2-python==2.6.21 
     48libxml2dom==0.4.7 
     49matplotlib==1.0.0 
     50mock==0.7.0b2 
     51nose==0.11.4 
     52numpy==1.3.0 
     53pycairo==1.2.2 
     54simplejson==2.1.1 
     55wsgiref==0.1.2 
     56}}} 
     57 
     58The rest of this page explains how to  
     59 
     60== COWS Server (and COWS and COWS client) installation (with dependencies) == 
     61 
     62These instructions suggest installing the COWS server into a [http://pypi.python.org/pypi/virtualenv virtualenv] self-contained python environment. They also suggest the use of [http://pypi.python.org/pypi/pip pip] as the installation tool. Alternatively, buildout can be used. 
    2263 
    2364Note that not everything builds automatically and there are various stages when environment variables need to be set to pick up appropriate versions of packages. 
     
    2768=== 1. Non-python packages === 
    2869 
    29 netcdf==3.6.3 
    30  
    31 # Manually install NetCDF 
     70'''NetCDF''' 
     71 
     72Version: 3.6.3 
     73 
     74Manually install NetCDF libraries (Fortran not needed): 
     75 
     76{{{ 
    3277$ cd $HOME 
    3378$ mkdir -p external/netcdf/src 
     
    4085$ make install 
    4186$ make check 
    42  
    43 numpy==1.3.0 numpy-1.3.0-py2.6-linux-x86_64.egg 
    44  
    45 easy_install gave errors but pip said fine, trust pip! 
    46  
    47 cdat_lite cdat_lite-5.2_1-py2.6-linux-x86_64.egg 
    48  
    49 should work as long as it can find NetCDF: 
    50 export NETCDF_HOME=$HOME/external/netcdf 
    51  
    52 csml-2.7.13-py2.6.egg 
    53  
    54 FINE 
    55  
    56 cairo==1.2.4 
    57 Probably exists on any server, but can be built by Yast 
    58  
    59 pycairo==1.2.2 
    60 $ Needed to build pycairo compatible with release on westerly of cairo (1.2.4) so used 1.2.2 of pycairo 
    61 $ wget http://cairographics.org/releases/pycairo-1.2.2.tar.gz 
    62 $ tar xvzf pycairo-1.2.2.tar.gz 
    63 $ cd pycairo-1.2.2/ 
    64 $ # Need to make this dir for it to install OK 
    65 $ mkdir $HOME/python26/lib/pkgconfig 
    66 $ python setup.py build 
    67 $ python setup.py install 
    68 THen tested with a line stolen from geoplot (see: http://proj.badc.rl.ac.uk/ndg/browser/qesdi/geoplot/trunk/lib/geoplot/custom_cairo_renderer.py#L9): 
    69  
    70 geos # needed for libgeos_c.so file for python 
     87}}} 
     88 
     89'''Cairo''' 
     90 
     91Version: 1.2.4 
     92 
     93Probably exists on any server, but can be built by Yast or package manager. 
     94 
     95'''GEOS''' 
     96 
     97GEOS is needed for libgeos_c.so file for python, used in matplotlib, basemap and shapely. 
     98 
     99{{{ 
    71100$ cd 
    72 $ cd external 
     101$ cd external/netcdf/src 
    73102$ wget http://download.osgeo.org/geos/geos-3.2.2.tar.bz2 
    74103$ bunzip2 geos-3.2.2.tar.bz2 
     
    79108$ make 
    80109$ make install 
    81  
    82 Environment needs some of these... 
     110}}} 
     111 
     112=== 2. Python packages === 
     113 
     114First activate the virtualenv environment: 
     115 
     116{{{ 
     117$ cd $HOME 
     118$ . ENV/bin/activate 
     119}}} 
     120 
     121Most of the following packages was installed by typing: 
     122 
     123{{{ 
     124$ cd $HOME 
     125$ pip install <package>==<version> 
     126 
     127# E.g. 
     128 
     129$ pip install numpy=1.3.0 
     130}}} 
     131 
     132Now start installing... 
     133 
     134'''Numpy''' 
     135 
     136Version: 1.3.0 
     137 
     138pip installed egg: numpy-1.3.0-py2.6-linux-x86_64.egg 
     139 
     140{{{ 
     141pip install numpy==1.3.0 
     142}}} 
     143 
     144'''CdatLite''' 
     145 
     146Version: 5.2_1 
     147 
     148pip installed egg: cdat_lite-5.2_1-py2.6-linux-x86_64.egg 
     149 
     150{{{ 
     151$ export NETCDF_HOME=$HOME/external/netcdf 
     152$ pip install cdat_lite==5.2_1 
     153}}} 
     154 
     155'''CSML''' 
     156 
     157Version: 2.7.13 
     158 
     159easy_install installed egg: csml-2.7.13-py2.6.egg 
     160 
     161{{{ 
     162easy_install --install-dir=ENV/lib/python2.6/site-packages http://ndg.nerc.ac.uk/dist/csml-2.7.13-py2.6.egg 
     163}}} 
     164 
     165'''Pycairo''' 
     166 
     167Version: 1.2.2 
     168 
     169Needed to manually install this to use compatible version with system cairo version. 
     170 
     171Needed to build pycairo compatible with release on westerly of cairo (1.2.4) so used 1.2.2 of pycairo. Needed to download manually rather than use pip (because too old?). 
     172 
     173{{{ 
     174$ cd $HOME/external/src 
     175$ wget http://cairographics.org/releases/pycairo-1.2.2.tar.gz 
     176$ tar xvzf pycairo-1.2.2.tar.gz 
     177$ cd pycairo-1.2.2/ 
     178$ # Need to make this dir for it to install OK 
     179$ mkdir $HOME/python26/lib/pkgconfig 
     180$ python setup.py build 
     181$ python setup.py install 
     182}}} 
     183 
     184Test with: 
     185 
     186{{{ 
     187$ python -c 'import cairo' 
     188}}} 
     189 
     190OLD: Tested with (a line stolen from geoplot): 
     191OLD: http://proj.badc.rl.ac.uk/ndg/browser/qesdi/geoplot/trunk/lib/geoplot/custom_cairo_renderer.py#L9): 
     192 
     193'''matplotlib''' 
     194 
     195Version: 1.0.0 
     196 
     197Using egg: matplotlib-1.0.0-py2.6-linux-x86_64.egg 
     198 
     199Cannot install with PIP. Need to extract the egg and build locally, as instructed on wiki page at: 
     200 
     201 http://proj.badc.rl.ac.uk/dcip/wiki/UkcipDdp/Deployment/MatplotlibInstall 
     202 
     203{{{ 
     204$ # We'll extract an editable version of matplotlib to ./matplotlib 
     205$ cd $HOME/external/src 
     206$ easy_install -eb . matplotlib==1.0.0 
     207$ # Note the "pip install --src=. matplotlib==1.0.0" should also work 
     208$ cd matplotlib 
     209$ # Create a setup config file 
     210$ cp setup.cfg.template setup.cfg 
     211}}} 
     212 
     213Now edit the config file so it contains the following lines: 
     214 
     215{{{ 
     216#tag_svn_revision = 1 
     217--- 
     218backend = Cairo 
     219--- 
     220# 
     221# Added datapath to point to mpl-data dir 
     222datapath=/disks/westerly1/bull/ENV/etc/mpl-data 
     223}}} 
     224 
     225Make the {{{~/ENV/etc}}} dir to put the matplotlib data files in: 
     226 
     227{{{ 
     228$ mkdir ~/ENV/etc 
     229}}} 
     230 
     231Now create the egg: 
     232 
     233{{{ 
     234$ python setupegg.py bdist_egg 
     235}}} 
     236 
     237Now copy the new egg to site-packages: 
     238 
     239{{{ 
     240$ cp dist/*.egg $HOME/ENV/lib/python2.6/site-packages/ 
     241$ export PYTHONPATH=$PYTHONPATH:$HOME/ENV/lib/python2.6/site-packages/matplotlib-1.0.0-py2.6-linux-x86_64.egg 
     242}}} 
     243 
     244And copy the data files into the {{{etc}}} dir: 
     245 
     246{{{ 
     247cp -r lib/matplotlib/mpl-data $HOME/ENV/etc/ 
     248}}} 
     249 
     250And set data path: 
     251 
     252{{{ 
     253export MATPLOTLIBDATA=$HOME/ENV/etc/mpl-data 
     254}}} 
     255 
     256Test with: 
     257 
     258{{{ 
     259$ python -c 'import matplotlib' 
     260$ python -c 'from matplotlib.backends.backend_cairo import RendererCairo, FigureCanvasCairo, cairo, Affine2D' 
     261}}} 
     262 
     263'''Basemap''' 
     264 
     265Version: 1.0 
     266 
     267Using egg: basemap-1.0-py2.6-linux-x86_64.egg 
     268 
     269Need to extract the egg and build locally, as instructed on wiki page at: 
     270 
     271 http://proj.badc.rl.ac.uk/dcip/wiki/UkcipDdp/Deployment/MatplotlibInstall 
     272 
     273{{{ 
     274$ # Environment needs some of these... 
    83275$ export GEOS_DIR=$HOME/external/geos 
    84 $ export LD_LIBRARY_PATH=$HOME/external/geos/lib:$HOME/external/geos/lib/libgeos_c.so 
    85  
    86 matplotlib matplotlib-1.0.0-py2.6-linux-x86_64.egg 
    87 # Followed instructions on basemap and matplotlib at: 
    88 http://proj.badc.rl.ac.uk/dcip/wiki/UkcipDdp/Deployment/MatplotlibInstall 
    89  
    90 $ diff setup.cfg.template setup.cfg 
    91 5c5 
    92 < tag_svn_revision = 1 
    93 --- 
    94 > #tag_svn_revision = 1 
    95 10c10 
    96 < #basedirlist = /usr 
    97 --- 
    98 > #basedirlist = /disks/westerly1/cow/svn/cowsserver/cowsserver/buildout/matplotlib 
    99 75c75 
    100 < #backend = Agg 
    101 --- 
    102 > backend = Cairo 
    103 83a84,85 
    104 > 
    105 > datapath=/disks/westerly1/svn/cowsserver/cowsserver/buildout/matplotlib/mpl-data 
    106 export MATPLOTLIBDATA=$HOME/svn/cowsserver/buildout/matplotlib/mpl-data 
    107 $ cd buildout 
    108 $ cp -r matplotlib/lib/matplotlib/mpl-data matplotlib/ 
    109  
    110 basemap basemap-1.0-py2.6-linux-x86_64.egg 
    111 # NOW basemap 
    112 $ export GEOS_DIR=$HOME/external/geos 
    113 $ easy_install -eb . basemap  # this creates a local download to build basemap in 
    114 $ cd basemap/ 
     276$ export LD_LIBRARY_PATH=$HOME/external/geos/lib 
     277}}} 
     278 
     279OLD***:$HOME/external/geos/lib/libgeos_c.so 
     280 
     281{{{ 
     282$ # We'll extract an editable version of basemap to ./basemap 
     283$ cd $HOME/external/src 
     284$ easy_install -eb . basemap 
     285$ cd basemap 
    115286$ python setupegg.py bdist_egg 
    116 $ cp dist/*.egg ../eggs/ 
    117 $ cd ../ 
    118 $ cp -r basemap/build/lib.linux-x86_64-2.6/mpl_toolkits/basemap/data basemap-data 
    119 $ export BASEMAPDATA=$HOME/svn/cowsserver/buildout/basemap-data 
     287}}} 
     288 
     289Now copy the new egg to site-packages and setup basemap-data: 
     290 
     291{{{ 
     292$ cp dist/*.egg $HOME/ENV/lib/python2.6/site-packages/ 
     293$ cp -r lib/mpl_toolkits/basemap/data $HOME/ENV/etc/basemap-data 
     294$ export PYTHONPATH=$PYTHONPATH:$HOME/ENV/lib/python2.6/site-packages/basemap-1.0-py2.6-linux-x86_64.egg 
     295$ export BASEMAPDATA=$HOME/ENV/etc/basemap-data 
     296}}} 
     297 
    120298Environment seemed to then need: 
    121299$ export DBFLIBSO=$HOME/svn/cowsserver/buildout/basemap/build/lib.linux-x86_64-2.6 
    122 # SOME TESTS TO RUN - just want to see they don't raise Exceptions 
    123 Test 1: 
    124 {{{ 
    125 from matplotlib.backends.backend_cairo import RendererCairo, FigureCanvasCairo, cairo, Affine2D 
    126 }}} 
    127 Test 2: 
    128 {{{ 
    129 import pylab 
    130 from mpl_toolkits.basemap import Basemap 
    131 b = Basemap() 
    132 b.drawcoastlines() 
    133 pylab.savefig('map.png') 
    134 }}} 
    135 Test 3: NEEDS TO BE VERIFIED IN TERMS OF rsphere 
    136 {{{ 
    137 from mpl_toolkits import basemap 
    138 x = basemap.Basemap(llcrnrlon=-10.5,llcrnrlat=49.5,urcrnrlon=3.5,urcrnrlat=59.5, 
    139             resolution='i',projection='tmerc',lon_0=-4.36,lat_0=54.7, 
    140             rsphere=[6370997, 1]) 
    141 }}} 
    142  
    143 ****???**** 
    144  
    145 geoplot (latest trunk - under qesdi) - investigate fix in rsphere usage!!!! 
    146 {{{ 
    147 # From googling (see: http://mapserver.org/errors.html#msprocessprojection-projection-library-error-major-axis-or-radius-0-not-given) it looks like you need to specify the ellipsoid. I tried this using the "rsphere" argument which can be: 
    148  1. A float/int of the earth's radius (DEFAULT = 6370997m) 
    149  2. A sequence of (major_axis, minor_axis) - I got segmentation faults when I tried making these similar, so I used option 3... 
    150  3. The documentation says """Note: sometimes an ellipsoid is specified by the major axis and an inverse flattening parameter (if). The minor axis (b) can be computed from the major axis (a) and the inverse flattening parameter using the formula if = a/(a-b).""" - I set it to (6370997, 1) for now. 
    151 **** 
    152 }}} 
    153  
    154 pil PIL-1.1.7-py2.6-linux-x86_64.egg 
    155 image_utils image_utils-1.0-py2.6.egg 
    156  
    157 Pylons==1.0 
    158 installed: {{{ 
     300 
     301Test with: 
     302 
     303{{{ 
     304$ python -c 'import pylab;from mpl_toolkits.basemap import Basemap; b = Basemap();b.drawcoastlines(); pylab.savefig("/tmp/map.png")' 
     305$ python -c 'from mpl_toolkits import basemap; x =basemap.Basemap(llcrnrlon=-10.5,llcrnrlat=49.5,urcrnrlon=3.5,urcrnrlat=59.5,resolution="i",projection="tmerc",lon_0=-4.36,lat_0=54.7,rsphere=[6370997,1])' 
     306}}} 
     307 
     308'''PIL''' 
     309 
     310Version: 1.1.7 
     311 
     312pip installed egg: PIL-1.1.7-py2.6-linux-x86_64.egg 
     313 
     314{{{ 
     315$ pip install pil==1.1.7 
     316}}} 
     317 
     318Test with: 
     319 
     320{{{ 
     321$ python -c 'import Image' 
     322}}} 
     323 
     324'''Geoplot''' 
     325 
     326Version: taken from trunk and then edited as follows: 
     327 
     328{{{ 
     329$ svn co http://astephen@proj.badc.rl.ac.uk/svn/ndg/qesdi/geoplot/trunk geoplot 
     330$ cd geoplot 
     331}}} 
     332 
     333Now edit the following line: 
     334 
     335{{{ 
     336$ svn diff lib/geoplot/grid_builder_national.py 
     337                                urcrnrlon=10, urcrnrlat=10, 
     338+                               rsphere=[6370997,1], 
     339                                resolution=None) 
     340}}} 
     341 
     342TOFIX: This fix needs checking. 
     343 
     344Test with: 
     345 
     346{{{ 
     347$ python -c 'import geoplot.grid_builder_national' 
     348}}} 
     349 
     350 
     351'''image_utils''' 
     352 
     353Version: 1.0 
     354 
     355Installed from SVN repository: 
     356 
     357{{{ 
     358$ cd $HOME/external 
     359$ svn co http://astephen@proj.badc.rl.ac.uk/svn/ndg/qesdi/image_utils/trunk image_utils                      
     360$ python setup.py develop 
     361}}} 
     362 
     363Test with: 
     364 
     365{{{ 
     366$ python -c 'import image_utils' 
     367}}} 
     368 
     369'''Pylons''' 
     370 
     371Version: 1.0 
     372 
     373When you {{{pip install}}} pylons-1.0 you get the following dependencies installed as eggs: 
     374 
     375{{{ 
    159376Beaker-1.5.4-py2.6.egg 
    160377decorator-3.2.0-py2.6.egg 
     
    162379Mako-0.3.4-py2.6.egg 
    163380MarkupSafe-0.11-py2.6-linux-x86_64.egg 
     381nose-0.11.4-py2.6.egg 
    164382Paste-1.7.4-py2.6.egg 
    165383PasteDeploy-1.3.4-py2.6.egg 
     
    174392}}} 
    175393 
    176  
    177 mock mock-0.7.0b2-py2.6.egg 
    178 nose nose-0.11.4-py2.6.egg 
    179  
    180  
    181 Shapely Shapely-1.2.5-py2.6.egg 
    182  
    183 Genshi Genshi-0.6-py2.6.egg 
    184    
    185 owslib  OWSLib-0.3.1-py2.6.egg 
     394So try it: 
     395 
     396{{{ 
     397$ pip install pylons==1.0 
     398}}} 
     399 
     400'''Mock''' 
     401 
     402Version: 0.7.0b2 
     403 
     404Pip installed egg: mock-0.7.0b2-py2.6.egg 
     405 
     406{{{ 
     407$ pip install mock==0.7.0b2 
     408}}} 
     409 
     410'''Shapely''' 
     411 
     412Version: 1.2.5 
     413 
     414Pip installed egg: Shapely-1.2.5-py2.6.egg 
     415 
     416{{{ 
     417$ pip install shapely==1.2.5 
     418}}} 
     419 
     420'''Genshi''' 
     421 
     422Version: 0.6 
     423 
     424Pip installed egg: Genshi-0.6-py2.6.egg 
     425 
     426{{{ 
     427$ pip install genshi==0.6 
     428}}} 
     429 
     430'''owslib''' 
     431 
     432Version: 0.3.1 
     433 
     434pip installed egg: OWSLib-0.3.1-py2.6.egg 
     435 
     436{{{ 
     437$ pip install owslib==0.3.1 
     438}}} 
    186439 
    187440cows 
    188441cowsserver 
    189442 
    190 # used for testing 
    191 ###### NOT NEEDED: lxml-2.3beta1-py2.6-linux-x86_64.egg  
    192  
    193 libxml2 libxml2-python-2.6.21 
    194 Web page says libxml2dom needs libxml2 so found build and installed: 
    195 $ cd  
    196 $ cd external 
     443=== 3. Python packages only used for testing === 
     444 
     445'''libxml2''' 
     446 
     447Version: 2.6.21 
     448 
     449Need to install {{{lib2xmldom}}} which requires {{{libxml2}}}. Need to download source as 
     450no egg available. 
     451 
     452OLD: NOT NEEDED: lxml-2.3beta1-py2.6-linux-x86_64.egg  
     453 
     454{{{ 
     455$ cd $HOME/external 
    197456$ wget ftp://xmlsoft.org/libxml2/python/libxml2-python-2.6.21.tar.gz 
    198457$ tar xzvf libxml2-python-2.6.21.tar.gz 
     
    200459$ python setup.py build 
    201460$ python setup.py install 
    202  
    203  
    204 libxml2dom libxml2dom-0.4.7-py2.6.egg 
    205  
    206 # Test 
    207 $ python -c 'import libxml2; import libxml2dom' 
     461}}} 
     462 
     463Test with: 
     464 
     465{{{ 
     466$ python -c 'import libxml2' 
     467}}} 
     468 
     469'''libxml2dom''' 
     470 
     471Version: 0.4.7 
     472 
     473pip installed egg: libxml2dom-0.4.7-py2.6.egg 
     474 
     475{{{ 
     476pip install libxml2dom==0.4.7 
     477}}} 
     478 
     479Test with: 
     480 
     481{{{ 
     482$ python -c 'import libxml2dom' 
     483}}} 
     484 
     485== Installing cows libraries == 
     486 
     487At present I've installed from the migrated branch and used develop eggs. 
     488 
     489COWS: 
     490 
     491{{{ 
     492$ cd $HOME/external 
     493$ svn co http://astephen@proj.badc.rl.ac.uk/svn/ndg/cows/branches/migrate-py26-pylons10 cows 
     494$ cd cows 
     495$ python setup.py develop 
     496}}} 
     497 
     498COWS Server: 
     499 
     500{{{ 
     501$ cd $HOME/external 
     502$ svn co http://astephen@proj.badc.rl.ac.uk/svn/ndg/cowsserver/branches/migrate-py26-pylons10 cowsserver 
     503$ cd cowsserver 
     504$ python setup.py develop 
     505}}} 
     506 
     507COWS Client: 
     508 
     509{{{ 
     510$ cd $HOME/external 
     511$ svn co http://astephen@proj.badc.rl.ac.uk/svn/ndg/cowsclient/branches/migrate-py26-pylons10 cowsclient 
     512$ cd cowsclient 
     513$ python setup.py develop 
     514}}} 
     515 
     516 
     517=== Setting up the environment to run === 
     518 
     519The following additions were appended to the {{{activate}}} script in the virtualenv: 
     520 
     521{{{ 
     522# Additional environment variables required 
     523export GEOS_DIR=$HOME/external/geos 
     524export LD_LIBRARY_PATH=$HOME/external/geos/lib 
     525export PYTHONPATH=$PYTHONPATH:$HOME/ENV/lib/python2.6/site-packages/matplotlib-1.0.0-py2.6-linux-x86_64.egg 
     526export MATPLOTLIBDATA=$HOME/ENV/etc/mpl-data 
     527export PYTHONPATH=$PYTHONPATH:$HOME/ENV/lib/python2.6/site-packages/basemap-1.0-py2.6-linux-x86_64.egg 
     528export BASEMAPDATA=$HOME/ENV/etc/basemap-data 
     529}}} 
     530 
     531Then the environment can be set up with: 
     532 
     533{{{ 
     534$ . $HOME/ENV/bin/activate 
     535}}} 
     536 
     537== Testing running a service in the above environment == 
     538 
     539To test the service, refer to the notes on the [wiki:CowsFramework/GettingStarted Getting Started with COWS] page using the 
     540start directories for COWS server and COWS client apps as: 
     541 
     542{{{ 
     543$ $HOME/external/cowsserver 
     544$ $HOME/external/cowsclient 
     545}}}