
📦 HADEX Installation Guide

System Requirements

Minimum Requirements

· OS: Linux (Ubuntu 20.04+), macOS 12+, Windows 10/11 (WSL2 recommended)
· Python: 3.9 - 3.11
· RAM: 8 GB
· Storage: 20 GB free space
· CPU: 4 cores

Recommended Requirements

· OS: Ubuntu 22.04 or newer
· Python: 3.10
· RAM: 16 GB
· Storage: 50 GB SSD
· CPU: 8+ cores
· GPU: NVIDIA with 8+ GB VRAM (for ML acceleration)

Installation Methods

Method 1: PyPI (Recommended)

```bash
# Create virtual environment
python -m venv hadex_env
source hadex_env/bin/activate  # On Windows: hadex_env\Scripts\activate

# Install HADEX
pip install hadex

# Verify installation
hadex doctor
```

Method 2: From Source (Development)

```bash
# Clone repository
git clone https://gitlab.com/gitdeeper8/hadex.git
cd hadex

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

# Verify installation
pytest tests/ -v
```

Method 3: Docker

```bash
# Pull from Docker Hub
docker pull gitdeeper8/hadex:latest

# Run container
docker run -it \
  -p 8000:8000 \
  -p 8501:8501 \
  -v $(pwd)/data:/data \
  gitdeeper8/hadex:latest

# Or build locally
docker build -t hadex:local .
docker run -it hadex:local
```

Method 4: Termux (Android)

```bash
# Update packages
pkg update && pkg upgrade

# Install dependencies
pkg install python python-pip git

# Install HADEX
pip install hadex

# Run basic test
hadex pressure --depth 10911
```

Platform-Specific Instructions

Ubuntu/Debian

```bash
# Install system dependencies
sudo apt update
sudo apt install -y \
  python3-pip \
  python3-venv \
  git \
  build-essential \
  libopenblas-dev \
  liblapack-dev

# Install HADEX
pip install hadex
```

macOS

```bash
# Install Homebrew if not present
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install dependencies
brew install python@3.10 git

# Install HADEX
pip3 install hadex
```

Windows (WSL2)

```powershell
# In PowerShell (Admin)
wsl --install -d Ubuntu

# In WSL terminal
sudo apt update
sudo apt install -y python3-pip python3-venv git
pip3 install hadex
```

Verification

After installation, verify everything works:

```bash
# Run diagnostics
hadex doctor

# Test pressure calculation
hadex pressure --depth 10911

# List trenches
hadex trenches

# Run example
python -c "
from hadex.core import EquationOfState
eos = EquationOfState(temperature=1.9, salinity=34.68, pressure=110.2)
print(f'Density at Challenger Deep: {eos.compute_density():.1f} kg/m³')
"
```

Troubleshooting

Common Issues

Issue: ModuleNotFoundError: No module named 'hadex'
Solution:

```bash
pip install --upgrade pip
pip install --no-cache-dir hadex
```

Issue: Memory errors during simulation
Solution: Reduce simulation size

```python
# Use smaller swarm or shorter duration
swarm = SwarmNavigationEngine(num_vehicles=6)  # instead of 12
```

Issue: Permission denied when installing
Solution:

```bash
# Use virtual environment (recommended)
python -m venv hadex_env
source hadex_env/bin/activate
pip install hadex

# Or install for user only
pip install --user hadex
```

Getting Help

· Documentation: https://hadex.readthedocs.io
· Issues: https://gitlab.com/gitdeeper8/hadex/-/issues
· Email: gitdeeper@gmail.com
