flopscope.
Getting Started

Installation

Use this page when setting up flopscope for the first time.

You will learn:

  • How to install the latest stable release from PyPI
  • How to install the bleeding-edge version directly from git
  • How to set up a development install
  • How to verify your installation works
  • How to fix common installation pitfalls

Install the latest stable release (PyPI)

uv add flopscope
# or with pip
pip install flopscope

Use this for most cases. Releases follow Semantic Versioning; see the CHANGELOG for what's in each release.

Install the bleeding-edge version (git)

uv add git+https://github.com/AIcrowd/flopscope.git
# or with pip
pip install git+https://github.com/AIcrowd/flopscope.git

Use this if you need a fix or feature that hasn't shipped to PyPI yet. Append @<ref> to pin to a branch, tag, or commit — e.g. ...flopscope.git@main or ...flopscope.git@v0.2.0.

Install for development

git clone https://github.com/AIcrowd/flopscope.git
cd flopscope
uv sync --all-extras

This gives you an editable install plus the dev, docs, and sympy extras.

Verify installation

uv run python -c "import flopscope as flops; print(flops.__version__)"

What you'll see

0.2.0+np2.2.6

The version string includes the installed NumPy version suffix. If you see a version number, flopscope is installed correctly.

Common pitfalls

Symptom: ImportError: numpy version mismatch

Fix: Flopscope supports NumPy >=2.0.0,<2.3.0 (default install uses NumPy 2.2). Using uv handles this automatically. If you installed manually, check your NumPy version:

uv run python -c "import numpy; print(numpy.__version__)"
  • Quickstart — run your first FLOP-counted computation

On this page