Installation

pref_voting is available on pypi and can be installed using pip (or uv).

pip3 install pref_voting

Alternatively, you can install the latest development version from source:

git clone https://github.com/voting-tools/pref_voting
pip3 install .

Requirements:

  • The package requires Python 3.10 or higher and has been tested on Python 3.10 - 3.13.

  • The following pip packages are required and installed automatically: filelock, scipy, networkx, tabulate, matplotlib, nashpy, numba, ortools, pathos, preflibtools, prefsampling, and seaborn

Warning

Since the package uses Numba, refer to the Numba documentation for the latest supported Python version: https://numba.readthedocs.io/en/stable/user/installing.html#version-support-information.

Optional dependencies

The interfaces to the VoteKit and abcvoting packages (see Interfaces to Other Packages) require optional dependencies that are not installed by default. Install them with the corresponding extras:

pip3 install "pref_voting[votekit]"      # VoteKit (requires Python >= 3.11)
pip3 install "pref_voting[abcvoting]"    # abcvoting
pip3 install "pref_voting[interfaces]"   # both