Skip to content

Installation

Requirements

  • Python 3.8 or higher
  • pip package manager

Install from PyPI

pip install fairsample

Install from Source

git clone https://github.com/yourusername/fairsample.git
cd fairsample
pip install -e .

Dependencies

The package will automatically install:

  • numpy >= 1.20.0
  • scikit-learn >= 1.0.0
  • scipy >= 1.7.0
  • pandas >= 1.3.0
  • matplotlib >= 3.4.0
  • seaborn >= 0.11.0
  • imbalanced-learn >= 0.9.0

Optional Dependencies

For additional features:

# Fuzzy logic support
pip install scikit-fuzzy>=0.4.2

# Optimization methods
pip install cvxopt>=1.2.0

# Development tools
pip install fairsample[dev]

Verify Installation

import fairsample
print(fairsample.__version__)

Troubleshooting

Import Errors

If you get import errors, ensure all dependencies are installed:

pip install -r requirements.txt

Windows Users

Some packages may require Visual C++ build tools. Download from Microsoft.

Mac Users with M1/M2

Use conda for better compatibility:

conda install numpy scipy scikit-learn
pip install fairsample