Complete installation guide for MeridianAlgo.
- Python 3.10 or newer, tested on 3.10, 3.11, and 3.12
- Python 3.11 or newer recommended for best performance
- Windows 10 and 11
- macOS 10.14 or newer
- Linux, for example Ubuntu 18.04 or newer and CentOS 7 or newer
- CPU with 2 or more cores recommended
- RAM of 4 GB or more, 8 GB or more for large datasets
- Storage of 1 GB or more free space
- GPU is optional but helps for ML features, NVIDIA CUDA, AMD ROCm, or Apple MPS
# Install MeridianAlgo
pip install meridianalgo
# Verify installation
python -c "import meridianalgo; print(meridianalgo.__version__)"The core library runs on numpy, pandas, and scipy alone.
# Install with all optional dependencies
pip install "meridianalgo[all]"
# Install with specific groups
pip install "meridianalgo[ml]" # scikit-learn, torch, statsmodels, hmmlearn
pip install "meridianalgo[optimization]" # cvxpy, cvxopt
pip install "meridianalgo[volatility]" # arch (GARCH)
pip install "meridianalgo[data]" # lxml, beautifulsoup4, polygon-api-client
pip install "meridianalgo[distributed]" # ray, dask
pip install "meridianalgo[dev]" # test and lint toolingThe core install imports cleanly without any of these extras. The extras unlock the machine learning models, convex solvers, and maximum likelihood GARCH. Modules that need an optional dependency stay unavailable until the matching group is installed, and the rest of the library keeps working.
# Create virtual environment
python -m venv meridianalgo_env
# Activate virtual environment
# Windows
meridianalgo_env\Scripts\activate
# macOS and Linux
source meridianalgo_env/bin/activate# Install from PyPI
pip install meridianalgo
# Or install from source
git clone https://github.com/MeridianAlgo/Python-Packages.git
cd Python-Packages
pip install -e .For developers who want to contribute or modify the source code.
# Clone repository
git clone https://github.com/MeridianAlgo/Python-Packages.git
cd Python-Packages
# Install in development mode
pip install -e .
# Install development dependencies
pip install "meridianalgo[dev]"
# Run tests
pytest tests/If you prefer using Conda.
# Create conda environment
conda create -n meridianalgo python=3.12
# Activate environment
conda activate meridianalgo
# Install the core scientific stack with conda
conda install numpy pandas scipy
# Install MeridianAlgo with pip
pip install meridianalgoFor containerized deployment.
# Dockerfile
FROM python:3.12-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir meridianalgo
# Set working directory
WORKDIR /app
# Copy application code
COPY . .
# Run application
CMD ["python", "your_script.py"]After installation, verify everything is working with APIs that run in the base install.
# Check the version
import pandas as pd
import meridianalgo as ma
print(f"MeridianAlgo version {ma.__version__}")
# Technical indicators, base install, no extras
prices = pd.Series([100, 101, 102, 101, 103, 104, 103, 105])
rsi = ma.RSI(prices, period=4)
print(f"RSI calculated, {len(rsi.dropna())} values")
# Top level performance metrics
returns = prices.pct_change().dropna()
print(f"Sharpe ratio {ma.calculate_sharpe_ratio(returns):.4f}")
print("All checks passed. MeridianAlgo is working correctly.")# If you get import errors, try reinstalling
pip uninstall meridianalgo
pip install meridianalgo
# Or install with --force-reinstall
pip install --force-reinstall meridianalgo# For CPU only PyTorch
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
# For CUDA if you have an NVIDIA GPU
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118# For large datasets, process the data in chunks
import pandas as pd
chunk_size = 1000
for chunk in pd.read_csv("large_data.csv", chunksize=chunk_size):
# Process chunk
passIf you get Microsoft Visual C++ errors, install the Microsoft C++ Build Tools, or use conda instead of pip.
# If you get compilation errors, install the Xcode command line tools
xcode-select --install# Install build essentials
sudo apt-get update
sudo apt-get install build-essential
# For Ubuntu and Debian
sudo apt-get install python3-dev
# For CentOS and RHEL
sudo yum install python3-devel# Update to latest version
pip install --upgrade meridianalgo
# Check current version
python -c "import meridianalgo; print(meridianalgo.__version__)"# Uninstall MeridianAlgo
pip uninstall meridianalgoIf you encounter issues, here is the order that usually helps.
- Search GitHub Issues for similar problems
- Create a new issue with detailed error information
- Join GitHub Discussions for community help
After a successful installation, here is where to go.
- Read the Quick start guide to get started
- Explore the API reference for detailed documentation
- Try the per module snippets in the module guide
- Check the Performance benchmarks for optimization tips