This guide covers the installation and setup of Python OOUI.
Python OOUI requires:
- Python 2.7 or Python 3.x
- lxml
- python-dateutil
- six
- simpleeval < 0.9.12
Install the latest stable version from PyPI:
pip install oouiFor development or to get the latest features:
# Clone the repository
git clone https://github.com/gisce/python-ooui.git
cd python-ooui
# Install in development mode
pip install -e .
# Install development dependencies for testing
pip install -r requirements-dev.txtTo verify your installation is working correctly:
import ooui
from ooui.graph import parse_graph
from ooui.tree import parse_tree
from ooui.helpers import ConditionParser, Domain
# Test basic imports
print("Python OOUI installed successfully!")- lxml: Used for XML parsing and manipulation of graph and tree definitions
- python-dateutil: Provides enhanced date/time parsing and manipulation
- six: Ensures Python 2/3 compatibility
- simpleeval: Safe evaluation of Python expressions in conditions and domains
- mamba: Testing framework for behavior-driven development
- expects: Assertion library for testing
If you encounter issues installing lxml:
On Ubuntu/Debian:
sudo apt-get install libxml2-dev libxslt-dev python-dev
pip install lxmlOn CentOS/RHEL:
sudo yum install libxml2-devel libxslt-devel python-devel
pip install lxmlOn macOS:
# Using Homebrew
brew install libxml2 libxslt
pip install lxml
# Or using conda
conda install lxmlIf you encounter permission errors:
# Install for current user only
pip install --user ooui
# Or use virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install oouiUsing a virtual environment is the recommended approach:
# Create virtual environment
python -m venv ooui-env
# Activate it
source ooui-env/bin/activate # On Windows: ooui-env\Scripts\activate
# Install ooui
pip install ooui
# When done, deactivate
deactivateOnce installed, check out:
- Usage Guide to learn the basic concepts
- Examples for practical code samples
- API Reference for detailed documentation