Skip to main content

Installation Guide

Get Crous up and running in minutes with our comprehensive installation guide.

⚡ Quick Install

pip install crous
Verify Installation
python -c "import crous; print(f'✓ Crous {crous.__version__} installed!')"

System Requirements

Before You Install

Crous requires a C compiler to build from source. Most systems have this, but if not, follow the troubleshooting steps below.

Minimum Requirements

RequirementVersion
Python3.7 or later
C Compilergcc, clang, or MSVC
Memory100 MB free
Disk10 MB

Platform Support

PlatformStatusNotes
🐧 Linux (x86_64)✅ Fullgcc/clang required
🍎 macOS✅ FullXcode Command Line Tools required
🪟 Windows✅ FullVisual Studio Build Tools required
💪 ARM64⚠️ ExperimentalLinux only

Installation Methods

The easiest way to install Crous:

pip install crous

This will download and install:

  • Pre-built wheel (if available for your platform)
  • Or compile from source automatically

Upgrade to latest version:

pip install --upgrade crous

Method 2: From Source 🔧

For development or if pre-built wheels aren't available:

# Clone the repository
git clone https://github.com/crous/crous.git
cd crous

# Install in development mode (editable)
pip install -e .

# Or install normally
pip install .

Method 3: Conda 📦

If you're using Conda:

conda install -c conda-forge crous

Platform-Specific Setup

Ubuntu/Debian

# Update package list
sudo apt-get update

# Install build tools
sudo apt-get install build-essential python3-dev

# Install Crous
pip install crous

Fedora/RHEL

sudo dnf install gcc python3-devel
pip install crous

Arch Linux

sudo pacman -S gcc python
pip install crous

Virtual Environment Setup

Best Practice

Always use a virtual environment to avoid conflicts with system packages.

# Create virtual environment
python3 -m venv venv

# Activate it
source venv/bin/activate

# Install Crous
pip install crous

# Verify
python -c "import crous; print(crous.__version__)"

# Deactivate when done
deactivate

Docker Setup

Docker Image

Create a Dockerfile:

FROM python:3.11-slim

WORKDIR /app

# Install Crous
RUN pip install --no-cache-dir crous

# Copy your application
COPY . .

# Run your app
CMD ["python", "app.py"]

Build and run:

# Build the image
docker build -t my-crous-app .

# Run the container
docker run -it my-crous-app

# Or with volume mount
docker run -it -v $(pwd):/app my-crous-app

Docker Compose

docker-compose.yml:

version: '3.8'
services:
app:
build: .
volumes:
- .:/app
command: python app.py

Verification

Quick Test

import crous

# Create test data
data = {'message': 'Hello, Crous!', 'values': [1, 2, 3]}

# Serialize
binary = crous.dumps(data)
print(f"✓ Serialized to {len(binary)} bytes")

# Deserialize
result = crous.loads(binary)
assert result == data
print("✓ Deserialization successful!")
print(f"✓ Crous {crous.__version__} is working!")

Check Installation

# Show version
python -c "import crous; print(crous.__version__)"

# Show installation path
python -c "import crous; print(crous.__file__)"

# Show installed package info
pip show crous

Troubleshooting

Build Fails: No C Compiler

If you see: error: Microsoft Visual C++ 14.0 or greater is required

Solution depends on your platform - see Platform-Specific Setup section above.

Common Issues

Linux:

# Ubuntu/Debian
sudo apt-get install build-essential python3-dev

# Fedora/RHEL
sudo dnf install gcc python3-devel

# Arch
sudo pacman -S gcc python

macOS:

xcode-select --install

Windows:

  • Download Visual Studio Community
  • Install "Desktop development with C++"

Upgrade & Uninstall

Upgrade to Latest Version

# Check current version
pip show crous

# Upgrade
pip install --upgrade crous

# Upgrade to specific version
pip install crous==2.1.0

Uninstall

pip uninstall crous

# Remove all Crous-related files
pip uninstall crous -y

Development Installation

To contribute to Crous development:

# Clone repository
git clone https://github.com/crous/crous.git
cd crous

# Create virtual environment
python3 -m venv env
source env/bin/activate

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Install test dependencies
pip install pytest pytest-cov

# Run tests
pytest tests/ -v

# Build documentation
pip install sphinx
make docs

Next Steps

🎉 Installation complete! Now:

  1. 📚 Read the User Guide for tutorials and examples
  2. 🔌 Check the API Reference for complete documentation
  3. 🛠️ Explore Custom Serializers to extend Crous
  4. ⚙️ Learn the Architecture for implementation details

Getting Help