A python library for cooperative game theory
Table of Contents
To install latest stable version use:
pip install shapleypy
To install latest development version you can clone the repository and use hatch (must be installed) to create an enviroment containg latest dev version:
hatch shell
or build the project and install it to whatever enviroment you want:
hatch build
# the wheel will be located in dist directory
pip install $PATH_TO_WHEEL_FILE
To install this package for Linux you need to set $CPPFLAGS
to contain -std=c++11
. This can be achieve by
export CPPFLAGS="-std=c++11 $CPPFLAGS"
Note
We know that CPPFLAGS
are not meant for C++, but CXXFLAGS
are not suported by setuptools.
or by running the installation in form of
CPPFLAGS="-std=c++11" pip install shapleypy
not to make the standart pernament.
Also there are some non-python dependencies. Those could be installed via distribution package manager.
Ubuntu:
sudo apt-get install -y ppl-dev libgmp-dev libmpfr-dev libmpc-dev
Warning
Convex game generator is currently not available for MacOS
There are some non-python requirements. These could be installed via homebrew:
brew install ppl gmp mpfr libmpc
Note
If you installed those dependencies via brew
as shown you probably also will need to set paths of libraries installed by brew
for clang:
export CFLAGS="-I/opt/homebrew/include/ -L/opt/homebrew/lib/ -I/opt/homebrew/include/ -L/opt/homebrew/lib $CFLAGS"
Warning
Convex game generator and core solution concept are currently not available for Windows
Shapleypy
is distributed under the terms of the GPL-3.0 license.