diff --git a/doc/sphinx/faq.rst b/doc/sphinx/faq.rst index 24c71f9a1..8b805350e 100644 --- a/doc/sphinx/faq.rst +++ b/doc/sphinx/faq.rst @@ -10,7 +10,8 @@ Installation Download the MSI installer for Cantera and the corresponding Python module from `SourceForge `_. Choose between x86 and x64 based on the versions of Python and/or Matlab - you want to work with. + you want to work with. See :ref:`Windows Installation ` + for details. **How do I install Cantera on Linux?** diff --git a/doc/sphinx/index.rst b/doc/sphinx/index.rst index d17e6a9c2..7bc240b89 100644 --- a/doc/sphinx/index.rst +++ b/doc/sphinx/index.rst @@ -24,6 +24,7 @@ Documentation :maxdepth: 2 faq + Installation Instructions Compiliation Instructions language-interfaces cti/index diff --git a/doc/sphinx/install.rst b/doc/sphinx/install.rst new file mode 100644 index 000000000..59b07b3d1 --- /dev/null +++ b/doc/sphinx/install.rst @@ -0,0 +1,122 @@ +.. _sec-install: + +****************** +Installing Cantera +****************** + +.. _sec-install-win: + +Windows +======= + +Windows installers are provided for stable versions of Cantera. These +installation instructions are for Cantera 2.1.1. + +1. **Choose your Python version and architecture** + + - On Windows, Cantera supports Python 2.7 and Python 3.3. Python 3.3 is + recommended unless you need to use legacy code that does not work with + Python 3. You can install both Cantera Python modules simultaneously. + + - Cantera supports both 32- and 64- bit Python installations. + + - You need choose the matching Cantera installer for your Python version and + machine architecture. + + - The rest of these instructions will refer to your chosen version of Python + as *X.Y*. + + - If you are using Matlab, you must use the same architecture for Cantera and + Matlab. Matlab defaults to 64-bit if you are running a 64-bit operating + system. + +2. **Install Python** + + - Go to `python.org `_. + + - *64-bit*: Download the most recent "Windows X86-64 MSI Installer" for + Python *X.Y* (i.e. prefer 3.3.5 to 3.3.4, but not 3.4.1). + - *32-bit*: Download the most recent "Windows x86 MSI Installer" for + Python *X.Y*. + + - Run the installer. The default installation options should be fine. + + - Python is required in order to work with `.cti` input files even if you are + not using the Python interface to Cantera. + + - Cantera can also be used with alternative Python distributions such as + `Anaconda `_ or the Enthought + `Canopy `_ distribution. These + distributions will generally be based on the 64-bit version of Python 2.7, + and will include Numpy as well as many other packages useful for scientific + users. + +3. **Install Numpy** + + - Go to the `Unofficial Windows Binaries for Python Extension Packages page + `_. + + - Download the most recent release of the 1.x series for Python *X.Y* that + matches your Python architecture. The binaries for Cantera 2.1.1 require + Numpy 1.8.0 or newer. + + - Run the installer. + +4. **Remove old versions of Cantera** + + - Use The Windows "Add/Remove Programs" interface + + - Remove both the main Cantera package and the Python module. + + - The Python module will be listed as "Python *X.Y* Cantera ..." + +5. **Install Cantera** + + - Go to the `Cantera Downloads + `_ page. + + - *64-bit*: Download **Cantera-2.1.1-x64.msi** and + **Cantera-Python-2.1.1-x64-pyX.Y.msi**. + - *32-bit*: Download **Cantera-2.1.1-x86.msi** and + **Cantera-Python-2.1.1-x86-pyX.Y.msi**. + + - If you are only using the Python module, you do not need to download and + install the base package. + + - Run the installer(s). + +6. **Configure Matlab** (optional) + + - Set the environment variable ``PYTHON_CMD`` + + - From the *Start* menu (Windows 7) or the *Start* screen (Windows 8) type + "edit environment" and select "Edit environment variables for your + account". + - Add a *New* variable with ``PYTHON_CMD`` as the *name* and the full path + to the Python executable (e.g. ``C:\python27\python.exe``) as the + *value*. + - Setting ``PYTHON_CMD`` is not necessary if the path to ``python.exe`` is + in your ``PATH`` (which can be set from the same configuration dialog). + + - Launch Matlab + + - Go to *File->Set Path...* + + - Select *Add with Subfolders* + + - Browse to the folder ``C:\Program Files\Cantera\matlab\toolbox`` + + - Select *Save*, then *Close*. + +7. **Test the installation** + + - Python:: + + import cantera + gas = cantera.Solution('gri30.cti') + h2o = cantera.PureFluid('liquidvapor.cti', 'water') + + - Matlab:: + + gas = IdealGasMix('gri30.cti') + h2o = importPhase('liquidvapor.cti','water')