网页
综合
更新时间 2026-11-14 10:02:00
Installing with Pip — Cantera 3.2.0 documentation
自动蜘蛛
cantera.org
正文约 2138 字
Pip is a package installer for Python that can be used to install the Cantera Python module from PyPI.
On Windows, the PyPI packages are compiled using a single-threaded implementation of the LAPACK library, and cannot make use of multiple cores to speed up reactor network or flame simulations. If you want to use a version of Cantera with an optimized LAPACK implementation, you can install the Conda package instead.
The first step in installing the Cantera Python module using pip is to make sure you have a compatible version of Python installed and are able to run pip from the command line. Packages for Cantera 3.2.0 are available for Python versions 3.10, 3.11, 3.12, 3.13, and 3.14.
If you don’t already have Python installed, it can be downloaded from python.org or installed using your operating system’s package manager.
To check that you are able run pip, open a terminal / command prompt and run the following command:
If the above command doesn’t work, see the instructions at packaging.python.org for how to get pip working with your Python installation.
Virtual environments provide a way keeping separate sets of Python packages installed for different projects, where different environments can have different versions of packages that might otherwise conflict. To create and activate a virtual environment named ct-env to be used with Cantera, run the commands:
The second command should be run in the terminal each time you want to use the specified environment.
To install the Cantera Python module, first activate your virtual environment, if you’re using one. Then, run the command:
You can test that your installation is working by importing the Cantera module and creating a Solution object:
You should get the following output:
Sometimes, a pre-release (alpha or beta) version of Cantera may be available to install. However, pip defaults to installing the latest stable version. To allow installation of a pre-release, add the --pre flag:
You can check the version that was installed by running:
© Copyright 2001-2025, Cantera Developers.
Created using Sphinx 7.3.7.
Built with the PyData Sphinx Theme 0.15.4.
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。