Skip to content

muzikr/Shapleypy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shapleypy

A python library for cooperative game theory

PyPI - Version PyPI - Python Version Test License: GPL v3


Table of Contents

Installation

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

Linux

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

MacOS

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"

Windows

Warning

Convex game generator and core solution concept are currently not available for Windows

License

Shapleypy is distributed under the terms of the GPL-3.0 license.