Skip to the content.

KineticGas is available on PyPi as the pykingas package, for python versions 3.8-3.11, compiled for MacOS running on Apple Silicon, Linux and Windows.

In addition, wheels versions of KineticGas > 2.0.0 for macOS, Linux and Windows, as well as wheels for the latest version on GitHub can be downloaded here. Instructions for installing with pip directly from a downloaded wheel are provided at the linked page.

For MacOS running on Intel, or other operating systems, KineticGas must currently be built from source or installed from one of the distributed wheels linked above.

Dependencies

The Python package dependencies are listed in the pyproject.toml file in the root directory of the package.

To compile the binary that is called from the python wrapper, pybind11 is required. pybind11 is included in cpp/external as a git submodule, so cloning the KineticGas repository should provide you with the files you need.

A standalone C++ module, that works without the python wrapper is currently under development. See the branch pure_cpp/ for the most up-to-date version there.

Building from source

Python wheels for the latest version of KineticGas on main are built for macOS and Windows using cibuildwheels, and distributed here.

A build system using cmake and make is set up to support Mac, Linux and Windows.

First Try

If all goes well, running

git clone https://github.com/thermotools/KineticGas.git
cd KineticGas
mkdir build
cd build
cmake ..
make install
pip install ..

make sure to activate a virtual environment first if you want to avoid doing system-level installs.

Short explanation

The bash script cpp/build_kingas.sh uses cmake and make to compile the binary that is called from the python module. Then it moves the binary to the pykingas directory.

When something goes wrong

Note: The build system has been changed relatively recently, and is less tested than the build system that was used in the 2.0.0 release. If you encounter issues, please don’t hesitate to post an issue on github so that we can improve robustness. Also, the old build system should still work fine. So if you are having trouble, a workaround may be to download the build files in the v2.0.0 tagged version on github and use those.