Installation from source¶
Prerequisites¶
The prerequisites are:
- Modern python package manager -
uv - Git
- Access to the poreFlow repository
- 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:
Ensure you have access to the repository. After cloning, make sure you working directory is set to poreFlow before running.
Install dependencies and module¶
For the build environment:
Download Microsoft C++ Build Tools. Run the installer and select "Desktop development with C++" workload. Make sure these components are checked:
- MSVC v143 (or latest) C++ build tools
- Windows SDK
- C++ CMake tools for Windows
Install the python dev package, such as python3-dev to include the header files and static libraries.
To install poreflow, now simply run:
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:
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.
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: