Difference between revisions of "Building CDAT on Mac"

From VistrailsWiki
Jump to navigation Jump to search
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''These instructions were tested only on mac intel, with python versions 2.4.3 and 2.5.1'''
'''Updated instructions: '''
'''These instructions were tested on mac intel and PPC, both running Leopard, with [http://www.python.org/ftp/python/2.5.1/python-2.5.1-macosx.dmg macPython version 2.5.1]'''


* Requirements
* Requirements
Line 6: Line 7:
* Follow [[Mac_Intel_Instructions| these instructions]] to install vistrails development environment
* Follow [[Mac_Intel_Instructions| these instructions]] to install vistrails development environment
   
   
* Download cdat form the source code repository
* Download modified cdat from [http://www.vistrails.org/download/download.php?type=OTHER&id=modified-cdat-devel-mac.tar.gz here]. This is a modified version based on the cdat devel revision 6662.
  <nowiki> svn checkout http://www-pcmdi.llnl.gov/svn/repository/cdat/trunk cdat </nowiki>


* Download [http://www.vistrails.org/download/download.php?id=cdat_patch_no_fortran.tar.gz this patch] (building NetCDF without Fortran support) or if you have fortran compiler installed, download [http://www.vistrails.org/download/download.php?id=cdat_patch.tar.gz this other patch] and uncompress to the cdat folder.
* Uncompress the file
  $ tar -xzvf modified-cdat-devel-mac.tar.gz


* Perform the following commands:
* Supposing you have Python 2.5 installed, perform the following commands:
   $ unset PYTHONPATH
   $ unset PYTHONPATH
   $ cd cdat/exsrc
   $ cd cdat-devel/exsrc
   $ sudo ./install_script /Library/Frameworks/Python.framework/Versions/2.4
   $ sudo ./install_script /Library/Frameworks/Python.framework/Versions/2.5
   $ cd ..
   $ cd build
   $ sudo python install.py /Library/Frameworks/Python.framework/Versions/2.4
  $ sudo cp -r Pmw /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
  $ sudo ln -s /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy-1.1.0.dev5196-py2.5-macosx-10.3-i386.egg/numpy/core/include/numpy /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/
  $ cd ../..
   $ sudo python install.py --force --disable-contrib /Library/Frameworks/Python.framework/Versions/2.5
 


* Before running vistrails, reset PYTHONPATH variable:
* Before running vistrails, reset PYTHONPATH variable:
   $ export PYTHONPATH=<path/to/vtk_build>/Wrapping/Python:<path/to/vtk_build>/bin:.
   $ export PYTHONPATH=<path/to/vtk_build>/Wrapping/Python:<path/to/vtk_build>/bin:.


When running vistrails with cdat package, you'll have to run vistrails from an X11 terminal.
Test your cdat installation:
  $ python
  Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04)
  [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import vcs
  >>> import cdms2
  >>>
 
'''The cdat-vistrails package will be added soon.'''

Latest revision as of 15:32, 8 July 2008

Updated instructions: These instructions were tested on mac intel and PPC, both running Leopard, with macPython version 2.5.1

  • Requirements
    • You will need X11 to run CDAT. If you don't have it, install it from your Mac OS X Install Disc
  • Download modified cdat from here. This is a modified version based on the cdat devel revision 6662.
  • Uncompress the file
 $ tar -xzvf modified-cdat-devel-mac.tar.gz
  • Supposing you have Python 2.5 installed, perform the following commands:
 $ unset PYTHONPATH
 $ cd cdat-devel/exsrc
 $ sudo ./install_script /Library/Frameworks/Python.framework/Versions/2.5
 $ cd build
 $ sudo cp -r Pmw /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
 $ sudo ln -s /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy-1.1.0.dev5196-py2.5-macosx-10.3-i386.egg/numpy/core/include/numpy /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/
 $ cd ../..
 $ sudo python install.py --force --disable-contrib /Library/Frameworks/Python.framework/Versions/2.5
 
  • Before running vistrails, reset PYTHONPATH variable:
 $ export PYTHONPATH=<path/to/vtk_build>/Wrapping/Python:<path/to/vtk_build>/bin:.

Test your cdat installation:

 $ python
 Python 2.5.1 (r251:54869, Apr 18 2007, 22:08:04) 
 [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import vcs
 >>> import cdms2
 >>> 

The cdat-vistrails package will be added soon.