[cantera] r3414 committed - [Doc] Improve OS X installation instructions...

5 views
Skip to first unread message

can...@googlecode.com

unread,
Feb 27, 2015, 7:24:31 PM2/27/15
to cantera...@googlegroups.com
Revision: 3414
Author: yar...@gmail.com
Date: Sat Feb 28 00:24:19 2015 UTC
Log: [Doc] Improve OS X installation instructions

Reflect changes due to 10.10 and current Xcode versions. Improve
organization
and describe some steps in greater detail. Thanks to Ingmar Schoegl for
suggesting some of the improvements.

Resolves Issue 254.
https://code.google.com/p/cantera/source/detail?r=3414

Modified:
/cantera/trunk/doc/sphinx/install.rst

=======================================
--- /cantera/trunk/doc/sphinx/install.rst Sat Feb 28 00:24:15 2015 UTC
+++ /cantera/trunk/doc/sphinx/install.rst Sat Feb 28 00:24:19 2015 UTC
@@ -157,88 +157,121 @@
Homebrew
---------
These instructions have been tested on Mac OS X 10.9 (Mavericks) with
Xcode 5.1
-and Mac OS X 10.10 (Yosemite) with Xcode 6.1.
+and Mac OS X 10.10 (Yosemite) with Xcode 6.1. If you've used Homebrew
before,
+you can skip any steps which have already been completed.

-Prerequisites
-~~~~~~~~~~~~~
+1. **Install Xcode and Homebrew**

-If you've used Homebrew before, you may have already completed some of
these
-steps and can skip them.
+ - Install Xcode from the App Store

-- Install Xcode from the App store
+ - From a Terminal, run::

-- From a Terminal, run::
+ sudo xcode-select --install
+ sudo xcodebuild -license

- sudo xcode-select --install
+ and agree to the Xcode license agreement.

- and agree to the Xcode license agreement
+ - Install `Homebrew <http://brew.sh/>`_ by running the following
command in a
+ Terminal::

-- Install `Homebrew <http://brew.sh/>`_
+ ruby -e "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/master/install)"

-- Run the following commands::
+2. **Set up the compilation environment**

- brew tap homebrew/science
- brew update
- brew install python scons sundials
+ - Run the following commands::

-- Put ``/usr/local/bin`` at the front of your path, e.g. add the following
to
- ``~/.bash_profile`` (creating this file if it doesn't already exist)::
+ brew tap homebrew/science
+ brew update
+ brew install python scons sundials

- export PATH=/usr/local/bin:$PATH
+ - Verify that your path is set up to use Homebrew's version of Python by
+ running::
+
+ which python
+
+ If this command does not print ``/usr/local/bin/python``, add the
following
+ to ``~/.bash_profile`` (creating this file if it doesn't already
exist; you
+ can use the command line editor ``nano`` to edit this file)::
+
+ export PATH=/usr/local/bin:$PATH
+
+ and then run::
+
+ source ~/.bash_profile
+
+ - Install Python packages required to compile Cantera by running::
+
+ pip install cython numpy
+
+ Note that these packages are required even if you do not plan on
using the
+ Cantera Python 2 module.
+
+ - If you want to build the Cantera Python 3 module, run::
+
+ brew install python3
+ pip3 install numpy cython
+
+3. **Compile and install Cantera**
+
+ * To compile and install Cantera using the default configuration, run::
+
+ brew install cantera
+
+ * The following options are supported:

-- Run::
+ ``--devel``
+ Installs Cantera with additional patches that will be included in
the
+ next maintenance release.

- source ~/.bash_profile
+ ``--HEAD``
+ Installs the current development version of Cantera.

-- If you want to build the Cantera Python 2 module, run::
+ ``--with-matlab=/Applications/MATLAB_R2014a.app/``
+ Installs the Matlab toolbox (with the path modified to match your
+ installed Matlab version)

- pip install cython numpy
+ * These options are specified as additional arguments to the ``brew
install``
+ command, e.g.::

-- If you want to build the Cantera Python 3 module, run::
+ brew install cantera --devel
--with-matlab=/Applications/MATLAB_R2014a.app/

- brew install python3
- pip3 install numpy cython
+4. **Test Cantera Installation (Python)**

-Installing Cantera
-~~~~~~~~~~~~~~~~~~
+ * The Python examples will be installed in::

-The installation command for Cantera supports several options:
+ /usr/local/lib/pythonX.Y/site-packages/cantera/examples/

-- To install Cantera with additional patches that will be included in the
next
- maintenance release, use the flag: ``--devel``
+ where ``X.Y`` is your Python version, e.g. ``2.7``.

-- To Install the current development version of Cantera, use the flag:
- ``--HEAD``
+ * You may find it convenient to copy the examples to your Desktop::

-- To install the Matlab toolbox, use the flag
- ``--with-matlab=/Applications/MATLAB_R2014a.app/`` (with the version
modified
- to match your installed Matlab version)
+ cp -r /usr/local/lib/python2.7/site-packages/cantera/examples
~/Desktop/cantera_examples

-Install Cantera by adding the desired options to the ``brew install``
command,
-e.g.::
+ * To run an example::

- brew install cantera --devel
--with-matlab=/Applications/MATLAB_R2014a.app/
+ cd cantera_examples/reactors
+ python reactor1.py

-The Matlab toolbox, if enabled, will be installed in::
+5. **Test Cantera Installation (Matlab)**

- /usr/local/lib/cantera/matlab
+ * The Matlab toolbox, if enabled, will be installed in::

-To use the Cantera Matlab toolbox, run the following commands in Matlab
(each
-time you start Matlab), or add them to a ``startup.m`` file located in
-``/Users/$USER/Documents/MATLAB``, where ``$USER`` is your username::
+ /usr/local/lib/cantera/matlab

- addpath(genpath('/usr/local/lib/cantera/matlab'))
- setenv('PYTHON_CMD', '/usr/local/bin/python')
+ * To use the Cantera Matlab toolbox, run the following commands in
Matlab
+ (each time you start Matlab), or add them to a ``startup.m`` file
located
+ in ``/Users/$USER/Documents/MATLAB``, where ``$USER`` is your
username::

-The Matlab examples will be installed in::
+ addpath(genpath('/usr/local/lib/cantera/matlab'))
+ setenv('PYTHON_CMD', '/usr/local/bin/python')

- /usr/local/share/cantera/samples/matlab
+ * The Matlab examples will be installed in::

-The Python examples will be installed in::
+ /usr/local/share/cantera/samples/matlab

- /usr/local/lib/pythonX.Y/site-packages/cantera/examples/
+ * You may find it convenient to copy the examples to your user
directory::

-where ``X.Y`` is your Python version, e.g. ``2.7``.
+ cp -r /usr/local/share/cantera/samples/matlab
~/Documents/MATLAB/cantera_examples

MacPorts
--------
Reply all
Reply to author
Forward
0 new messages