[Doc] Transfer OS-specific install instructions

This commit is contained in:
Ray Speth 2024-01-07 23:57:11 -05:00 committed by Ray Speth
parent 74a343c4d6
commit 925d10e668
9 changed files with 364 additions and 0 deletions

View File

@ -5,6 +5,7 @@ This page is a work in progress. For compilation instructions for Cantera 3.0, p
see <a href="/install/compiling-install.html">this page</a>.
```
(sec-compiling)=
## Compiling Cantera from Source
If you're interested in contributing new features to Cantera, or you want to try the

View File

@ -0,0 +1,66 @@
(sec-install-fedora-rhel)=
# Fedora Packages
RPM packages are provided for supported versions of Fedora Linux. Stable builds are
available in the official repositories and development builds are in a Community
Projects (COPR) repository.
:::{attention}
The Matlab interface is not available from this archive. To install the Matlab interface
on Fedora, you must install it using [conda](sec-conda-matlab-interface) or
[compile the source code](sec-compiling).
:::
As of Cantera 3.0.0, packages are available for currently supported releases of Fedora
Linux and Fedora Rawhide as well as Enterprise Linux 8.
The available packages are:
- `python3-cantera` - The Cantera Python module for Python 3.
- `cantera-devel` - Shared object libraries and header files for compiling your own C++
and Fortran 90 programs that use Cantera.
- `cantera-common` - Cantera data files and example programs.
- `cantera-static` - Static libraries for C++ and Fortran 90 development.
Cantera is available in the official repositories for Fedora; no configuration changes
are required.
## Basic Installation
On Enterprise Linux, if not already enabled, add the "Extra Packages for Enterprise
Linux" (EPEL) repository:
```bash
$ dnf install epel-release
```
To install all of the Cantera packages:
```bash
$ dnf install python3-cantera cantera-devel
```
or install whichever subset you need by adjusting the above command. The
`cantera-common` package is installed as a dependency if any other Cantera packages are
selected.
:::{tip}
If you plan on using Cantera from Python, you may also want to install IPython (an
advanced interactive Python interpreter) and Matplotlib (a plotting library). Matplotlib
is required to run some of the Python examples. These packages can be installed with:
```bash
$ dnf install python3-matplotlib python3-ipython
```
:::
## Installing pre-release Cantera versions
To access the development builds of Cantera (alpha or beta versions of the next version
of Cantera), enable the COPR:
```bash
$ dnf copr enable fuller/cantera-test
```
then install as described above.

View File

@ -0,0 +1,20 @@
(sec-install-freebsd)=
# FreeBSD Packages
A community-maintained FreeBSD port ``science/cantera`` and package are available. This
port provides the Octave interface when the OCTAVE option is turned on.
:::{attention}
The Matlab interface is not available from this port; to install the Matlab interface on
FreeBSD, you must install it using [conda](sec-conda-matlab-interface) or
[compile the source code](sec-compiling).
:::
The package can be installed by running
```shell
pkg install cantera
```
Further information about the Cantera package can be found on
[FreeBSD.org](https://www.freebsd.org/cgi/ports.cgi?query=cantera&stype=all) and [FreshPorts.org](https://www.freshports.org/science/cantera/).

View File

@ -0,0 +1,72 @@
(sec-install-gentoo)=
# Gentoo Packages
The Gentoo [sci-libs/cantera](https://packages.gentoo.org/packages/sci-libs/cantera)
package is provided using a main portage tree. Additionally the
[app-doc/cantera-docs](https://packages.gentoo.org/packages/app-doc/cantera-docs)
package is provided for offline Documentation API reference for Cantera package
libraries.
:::{attention}
The Matlab interface is not available from this archive. To install the Matlab interface
on Gentoo, you must install it using [conda](sec-conda-matlab-interface) or
[compile the source code](sec-compiling).
:::
The following interfaces and tools are installed by default:
- C++ Libraries and header files for compiling your own programs that use Cantera.
- [YAML tools](../userguide/ck2yaml-tutorial).
- Python module for Python 3 (`python` USE flag with appropriate `PYTHON_SINGLE_TARGET`;
optional).
The following additional interface is available:
- Fortran library and module files for compiling your own programs that use Cantera
(`fortran` USE flag; optional)
More information about `USE` flags can be found in the
[Gentoo Handbook](https://wiki.gentoo.org/wiki/Handbook:Parts/Working/USE).
To learn about per-package control of `USE` flags, please refer to the
[/etc/portage/package.use](https://wiki.gentoo.org/wiki//etc/portage/package.use)
article.
To install the `sci-libs/cantera` and `app-doc/cantera-docs` packages:
```bash
emerge --ask cantera cantera-docs
```
Most likely, the latest versions of these packages and/or some of their dependencies
still have unstable status in the Gentoo portage tree. In this case, you have to
`unmask` (allow installation within stable system) them preliminarily using
[/etc/portage/package.accept_keywords](https://wiki.gentoo.org/wiki//etc/portage/package.accept_keywords).
If `/etc/portage/package.accept_keywords` is present in your system as file then (for
64-bit architecture) you could unmask `sci-libs/cantera` package by running the
following command (as root):
```bash
echo "sci-libs/cantera ~amd64" >> /etc/portage/package.accept_keywords
```
Otherwise, if `/etc/portage/package.accept_keywords` is present in your system as a
directory, run the following command (as root):
```bash
echo "sci-libs/cantera ~amd64" >> /etc/portage/package.accept_keywords/cantera
```
:::{tip}
If you plan on using Cantera from Python, you may also want to install IPython
([dev-python/ipython](https://packages.gentoo.org/packages/dev-python/ipython), an
advanced interactive Python interpreter) and Matplotlib
([dev-python/matplotlib](https://packages.gentoo.org/packages/dev-python/matplotlib), a
plotting library). Matplotlib is required to run some of the Python examples. These
packages can be installed with:
```bash
emerge --ask ipython matplotlib
```
:::

View File

@ -10,6 +10,13 @@ see <a href="/install/index.html">this page</a>.
conda
pip
ubuntu
fedora-rhel
opensuse
gentoo
freebsd
macos
windows
```
```{seealso}

View File

@ -0,0 +1,41 @@
(sec-install-macos)=
# macOS Matlab Toolbox
The Cantera Matlab toolbox can be installed using a macOS-specific installer. The
toolbox requires macOS version 10.15 (Catalina) or higher and a copy of Matlab built for
Intel processors (which will run under Rosetta 2 on ARM-based processors).
:::{seealso}
To install the Cantera Python package, see the [pip](pip) or [conda](conda)
instructions. The Python package is required if:
- You need to convert legacy input files to YAML
- You need to convert Chemkin-format input files to YAML
:::
## Installation
Download the Matlab Interface Installer package from
[GitHub](https://github.com/Cantera/cantera/releases/)
When the file has downloaded, find it in Finder, hold *Control* and click the file.
Choose *Open* from the resulting menu, and select *Open* in the security dialog that
appears. Click *Continue* to proceed in the installer (noting that the installer may
open in the background; you can find its icon on the Dock), agreeing to the
[Cantera license terms](https://github.com/Cantera/cantera/blob/main/License.txt) and
the terms of the other open source software that we use.
By default, the installer will add some lines to the file
`$HOME/Documents/MATLAB/startup.m` to enable loading the Cantera toolbox when Matlab
starts. If you wish to disable this, click *Customize* and de-select the *Install
startup.m script* option. Finally, clicking *Install* will install the interface to the
`$HOME/Applications/Cantera` folder.
## Testing the installation
Open Matlab and enter the following code:
```matlab
gas = Solution('gri30.yaml')
h2o = Solution('liquidvapor.yaml','water')
```

View File

@ -0,0 +1,19 @@
(sec-install-opensuse)=
# openSUSE Packages
Cantera 3.0.0 packages are available for openSUSE Tumbleweed from a
[community repository](https://build.opensuse.org/package/show/home:fuller/cantera).
Installation is as follows:
```bash
$ zypper addrepo https://download.opensuse.org/repositories/home:fuller/openSUSE_Tumbleweed/home:fuller.repo
$ zypper refresh
$ zypper install cantera
```
:::{attention}
The Matlab interface is not available from this archive. To install the Matlab interface
on openSUSE, you must install it using [conda](sec-conda-matlab-interface) or
[compile the source code](sec-compiling).
:::

View File

@ -0,0 +1,96 @@
(sec-install-ubuntu)=
# Ubuntu Packages
As of Cantera 3.0.0, packages are available for Ubuntu 20.04 (Focal Fossa), Ubuntu 22.04
(Jammy Jellyfish), Ubuntu 23.04 (Lunar Lobster), and Ubuntu 23.10 (Mantic Minotaur). To
see which Ubuntu releases and Cantera versions are currently supported, visit the
[Cantera PPA](https://launchpad.net/~cantera-team/+archive/ubuntu/cantera).
The available packages are:
- `cantera-python3` - The Cantera Python module for Python 3.
- `libcantera-dev` - Libraries and header files for compiling your own C, C++ and
Fortran 90 programs that use Cantera.
- `cantera-common` - Cantera data files and example programs
- `libcantera3.0` - The Cantera C++ library, for use by packaged C++ applications.
- `libcantera-fortran3.0` - The Cantera Fortran 90 library, for use by packaged
Fortran 90 applications.
- `cantera` - A metapackage that will install everything except for the development
files.
:::{attention}
The Matlab packages are not available from this archive; to install the Matlab packages
on Ubuntu, you must install it using [conda](sec-conda-matlab-interface) or
[compile the source code](sec-compiling).
:::
## Installing
To add the Cantera PPA:
```bash
sudo apt install software-properties-common
sudo apt-add-repository ppa:cantera-team/cantera
```
To install all of the Cantera packages:
```bash
sudo apt install cantera-python3 libcantera-dev
```
or install whichever subset you need by adjusting the above command. The
`cantera-common` package is installed as a dependency if any other Cantera packages are
selected.
:::{tip}
If you plan on using Cantera from Python, you may also want to install IPython (an
advanced interactive Python interpreter) and Matplotlib (a plotting library). Matplotlib
is required to run some of the Python examples. These packages can be installed with:
```bash
sudo apt install python3-pip
pip3 install ipython matplotlib
```
:::
## Upgrading from an earlier Cantera version
If you already have Cantera installed from the `cantera-team` PPA, you can ensure that
you have the latest available version installed by running:
```bash
sudo apt update
sudo apt install cantera-python3
```
If you also have the `libcantera-dev` package installed, it should also be included on
the `apt install` command line.
## Installing pre-release Cantera versions
Sometimes, pre-release (alpha or beta) versions of Cantera which represent work toward
the next Cantera release will be available for users who want to use cutting-edge
features or test compatibility with the new version before it is released. To see the
latest Cantera versions available from this PPA, visit
<https://launchpad.net/~cantera-team/+archive/ubuntu/cantera-unstable>.
These packages can be installed by additionally enabling the
`cantera-team/cantera-unstable` PPA and then upgrading Cantera:
```bash
sudo apt-add-repository ppa:cantera-team/cantera-unstable
sudo apt install cantera-python3 libcantera-dev
```
You should also have the `cantera-team/cantera` PPA enabled, since the
`cantera-unstable` PPA *only* includes development versions.
If you later want to remove the development version and return to the latest stable
version, run the commands:
```bash
sudo apt-add-repository --remove ppa:cantera-team/cantera-unstable
sudo apt remove cantera cantera-common libcantera-dev cantera-python3
sudo apt install cantera-python3 libcantera-dev
```

View File

@ -0,0 +1,42 @@
(sec-install-windows)=
# Windows Packages
Windows installers are provided for stable versions of Cantera. These installers
provide the Matlab toolbox and header/library files that can be used to compile
C++ applications.
:::{seealso}
To install the Cantera Python package, see the [pip](pip) or [conda](conda)
installation instructions. The Python package is required if:
- You need to convert Chemkin-format input files to YAML
- You need to convert legacy CTI or XML input files to YAML
:::
1. **Remove old versions of Cantera**
- Use The Windows "Add/Remove Programs" interface to remove previous versions of
the `Cantera` package.
2. **Install Cantera**
- Go to the [Cantera Releases](https://github.com/Cantera/cantera/releases) page and
download **Cantera-3.0.0-x64.msi**.
- Run the installer and follow the prompts.
3. **Configure Matlab**
- 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*.
4. **Test the installation**
- From the Matlab prompt, run:
```matlab
gas = Solution('gri30.yaml')
h2o = Solution('liquidvapor.yaml', 'water')
```