Installation¶
This guide covers all installation options for ALICE-LRI: from PyPI, from source (Python and C++), linking in your C++ projects, and configuring log levels.
Python¶
pip install alice-lri
Important
Platform Support: The pip install command works out-of-the-box on Windows and Linux.
If you’re on macOS, the package isn’t available on PyPI yet, so you’ll need to follow the “Installation from Source” instructions below instead.
C++¶
Pre-built C++ binaries are not available. To use the C++ library, install from source as shown below.
Installation from Source¶
Build Dependencies¶
C++20 compatible compiler with CMake >= 3.20
Python >= 3.8 and pip (for Python bindings)
Conan >= 2.0 (can be installed with
pip install conan)First time using Conan? Run
conan profile detectafter installing to create a default profile.
Other dependencies are automatically managed by Conan and pip.
Python¶
git clone https://github.com/alice-lri/alice-lri.git
cd alice-lri
pip install ./python
C++¶
# Clone the repository
git clone https://github.com/alice-lri/alice-lri.git
cd alice-lri/lib
# Install dependencies and build
conan install . -s compiler.cppstd=20 -s build_type=Release -of build/ --build=missing
cmake -DCMAKE_BUILD_TYPE=Release -B build
# Install the library
cd build
sudo make install
sudo ldconfig # Update shared library cache on Linux
By default, this installs the library and headers to standard system locations (e.g., /usr/local/lib, /usr/local/include on Linux).
Using ALICE-LRI in Your C++ Project¶
After installing, you no longer need access to the source code. You can link against the installed library.
With CMake¶
You can link ALICE-LRI in your CMake project from anywhere as follows:
# ...
find_package(alice_lri REQUIRED)
# ...
target_link_libraries(YOUR_TARGET alice_lri::alice_lri)
With g++ (or similar compilers)¶
If you compile manually, link with -lalice_lri:
g++ your_source.cpp -lalice_lri -o your_program
Controlling Log Levels¶
ALICE-LRI supports configurable log levels at build time. By default, the log level is set to WARN, which means only warnings and errors will be printed (recommended for most users; normal operation will not print anything unless something abnormal happens).
You can change the log level when building with CMake by passing the -DLOG_LEVEL flag:
cmake -DCMAKE_BUILD_TYPE=Release -DLOG_LEVEL=DEBUG -B build
Valid options are: DEBUG, INFO, WARN, ERROR, NONE.
For Python, you can control the default log level by editing pyproject.toml in the python/ directory before building or installing from source. The default is also WARN.
Recommended: Keep the default WARN level unless you need more verbose output for debugging or development.