Skip to content
Snippets Groups Projects
Commit b35ad5e4 authored by Cees Voesenek's avatar Cees Voesenek
Browse files

Update installation instructions

parent 0175ffb4
Branches
No related tags found
1 merge request!19Move to modern standard Python package structure
......@@ -23,29 +23,44 @@ And of course, please cite the Deeplabcut articles: [Mathis et al, 2018](https:/
## Getting Started
### Installation and prerequisites
`dlc_flytracker` requires Python version `3.8`. It depends on the Python packages `deeplabcut`, `tensorflow` and other common packages like `numpy`, `scipy`, `matplotlib`, which are specified in [`requirements.txt`](requirements.txt).
FLiTrak3D currently only runs on Linux with Python version `3.9`. It depends on the Python packages `deeplabcut`, `tensorflow` and other common packages like `numpy`, `scipy`, `matplotlib`, which are specified in [`pyproject.toml`](pyproject.toml).
To guarantee that you have a Python 3.8 installation, regardless of your system's Python version, it is most convenient to create an Anaconda environment to install the dependencies of `dlc_flytracker`. [Miniconda](https://https://docs.conda.io/en/latest/miniconda.html) is a minimal distribution of Anaconda. Be aware that this is only free to use for academic use; commercial users need to pay a licence fee. Install it (or another Anaconda distribution) with the installer, Windows, Linux and macOS versions are available.
When installing the package including the optional DeepLabCut dependencies, you also need to install [libGL](https://dri.freedesktop.org/wiki/libGL/). On Ubuntu:
```bash
sudo apt install libgl-dev
```
Create and activate a new environment:
#### Installing with uv
The package is most conveniently installed with the Python project and package manager [uv](https://docs.astral.sh/uv/); install it first following their [instructions](https://docs.astral.sh/uv/getting-started/installation/).
To install FLiTrak3D without DeepLabCut and test dependencies, run:
```bash
uv sync
```
conda create -n "dlc-flytracker" python=3.8
conda activate dlc-flytracker
```
`dlc_flytracker` transitively depends on the HDF5 library. Install it system-wide with e.g. `sudo apt install libhdf5-dev` on Ubuntu, or install it in your currently active Anaconda environment with `conda install -c anaconda hdf5`.
Then, install all dependencies from [PyPI](https://https://pypi.org/) with `pip`:
To install FLiTrak3D with DeepLabCut and test dependencies, run:
```bash
uv sync --all-extras
```
Verify that the package was installed correctly by running:
```bash
uv run pytest
```
pip install -r requirements.txt
#### Installing with `pip`
Installing without using uv is also possible; run:
```bash
python3.9 -m venv .venv
. .venv/bin/activate
pip install .
```
Always activate this environment before running `dlc_flytracker` with:
If you want your edits to FLiTrak3D to be reflected without reinstalling, run `pip install -e .` instead of `pip install .`.
```
conda activate dlc-flytracker
To install the optional DeepLabCut and test dependencies, use:
```bash
pip install .[dev,deeplabcut]
```
### Experimental data and folder structure
......@@ -159,10 +174,9 @@ And you will need to select a fitting method (e.g. `fit_method` = '2d' or '3d'),
## Notes
### Running the tests
To run tests locally, navigate to the `tests/` directory, then run `pytest` with:
To run the tests locally, use:
```bash
cd tests
pytest
uv run pytest
```
## License
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment