Skip to content

Installation from source

Prerequisites

The prerequisites are:

  1. Modern python package manager - uv
  2. Git
  3. Access to the poreFlow repository
  4. Visual Studio Build Tools (Windows only)

uv is recommended thanks to its speed and built-in formatting. For installation, follow the official uv installation steps. For instructions on how to create a virtual environment, check out the Installation page.

Cloning repository

To clone the repository, use:

git clone https://gitlab.tudelft.nl/xiuqichen/poreFlow.git

Ensure you have access to the repository. After cloning, make sure you working directory is set to poreFlow before running.

cd poreFlow

Install dependencies and module

To install, simply run:

uv sync

This, by default makes use of the lockfile provided in this repository, ensuring you install the same packages as the main developers.

uv sync will automatically create a virtual environment. To activate the virtual environment:

source .venv/bin/activate
.venv\Scripts\activate
source .venv/bin/activate

Tip

If you are habing trouble installing packages, try deleting the lockfile (uv.lock) and re-running uv sync. uv will then install poreflow and it's dependencies from the requirements specified in pyproject.toml. It will also install additional developer dependencies such as Jupyter Lab and pytest.

Installing with pip instead (not recommended)

You can also install dependencies and the module by installing the module in editable mode using pip.

uv pip install -e ".[dev]"

Troubleshooting

_version.py not found

poreflow.__version__ depends on _version.py which is created when building poreFlow from source. Sometimes, when reinstalling this file removed. To generate it again, run:

uv build .