Installation Guide
Get Crous up and running in minutes with our comprehensive installation guide.
⚡ Quick Install
- PyPI (Recommended)
- Conda
- From Source
pip install crous
conda install -c conda-forge crous
git clone https://github.com/crous/crous.git
cd crous
pip install -e .
python -c "import crous; print(f'✓ Crous {crous.__version__} installed!')"
System Requirements
Crous requires a C compiler to build from source. Most systems have this, but if not, follow the troubleshooting steps below.
Minimum Requirements
| Requirement | Version |
|---|---|
| Python | 3.7 or later |
| C Compiler | gcc, clang, or MSVC |
| Memory | 100 MB free |
| Disk | 10 MB |
Platform Support
| Platform | Status | Notes |
|---|---|---|
| 🐧 Linux (x86_64) | ✅ Full | gcc/clang required |
| 🍎 macOS | ✅ Full | Xcode Command Line Tools required |
| 🪟 Windows | ✅ Full | Visual Studio Build Tools required |
| 💪 ARM64 | ⚠️ Experimental | Linux only |
Installation Methods
Method 1: PyPI (Recommended) 🎯
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
- 🐧 Linux
- 🍎 macOS
- 🪟 Windows
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
Option 1: Xcode Command Line Tools (Recommended)
xcode-select --install
pip install crous
Option 2: Full Xcode
Download from App Store, then:
pip install crous
Option 3: Homebrew
brew install python3
pip install crous
Visual Studio Build Tools
- Download Visual Studio Community
- Run installer and select "Desktop development with C++"
- Ensure "MSVC v142+" is checked
- Complete installation
- Open PowerShell and install:
pip install crous
Alternative: MinGW
# If you have MinGW installed
pip install crous
Virtual Environment Setup
Always use a virtual environment to avoid conflicts with system packages.
- Linux/macOS
- Windows PowerShell
# 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
# Create virtual environment
python -m venv venv
# Activate it
.\venv\Scripts\Activate.ps1
# 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
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
- No C Compiler
- Python.h Not Found
- setuptools Error
- Import Error
- Naming Conflict
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++"
Error: fatal error: Python.h: No such file or directory
Solution:
# Ubuntu/Debian
sudo apt-get install python3-dev
# Fedora/RHEL
sudo dnf install python3-devel
# macOS
brew install python3
Error: No module named setuptools
Solution:
pip install --upgrade pip setuptools wheel
pip install crous
Error: ModuleNotFoundError: No module named crous
Solution:
# Verify Python path
python -c "import sys; print(sys.executable)"
# Reinstall
pip uninstall crous
pip install crous
Error: module 'crous' has no attribute 'dumps'
Solution:
You might have a local file named crous.py that conflicts:
# Find the conflict
python -c "import crous; print(crous.__file__)"
# If it points to your local directory, rename your file
mv crous.py crous_local.py
# Then try importing again
python -c "import crous; print(crous.__version__)"
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:
- 📚 Read the User Guide for tutorials and examples
- 🔌 Check the API Reference for complete documentation
- 🛠️ Explore Custom Serializers to extend Crous
- ⚙️ Learn the Architecture for implementation details