Setting Up The Development Environment - anodot/daria GitHub Wiki
Main Requirement
Python3.10 or higher
Installation
# prepare env
pip3 install virtualenv
python3 -m virtualenv venv --python=$(which python3.10)
# activate env
source venv/bin/activate
# install dependencies and the agent
./local-setup.sh
Troubleshooting Installation
During the installation of some dependencies a linker error may occur:
ld: library not found for -lrrd
To resolve this issue install the appropriate dev package
# Debian / Ubuntu
## install the package
apt-get install librrd-dev
# OSX
## install the package
brew install rrdtool
## export paths for a build (example)
export LDFLAGS="-L/opt/homebrew/Cellar/rrdtool/1.7.2_1/lib"
export CPPFLAGS="-I/opt/homebrew/Cellar/rrdtool/1.7.2_1/include"
# reinstall the package
pip install rrdtool==0.1.15
Another example on the linker error:
ld: library not found for -lssl
To resolve this issue install the appropriate dev package
## install the package
brew install openssl
## export paths for an openssl (example)
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
# reinstall packages
pip3 install psycopg2-binary --force-reinstall --no-cache-dir
pip3 install psycopg2==2.9.1 --force-reinstall --no-cache-dir
Pre-commit Hooks
These hooks will automatically check Python code style and prevent not-formatted code submissions
# install package
pip install pre-commit
# enable hooks
pre-commit install
# disable hooks (if needed)
pre-commit uninstall