aero-pi-cam logo

aero-pi-cam documentation

Python Version Compatibility

This project is designed to work with Python 3.13.5 (as included on Raspberry Pi OS).

Version Requirements

Why Python 3.13.5?

The Raspberry Pi comes with Python 3.13.5 pre-installed, so no additional Python installation is needed. This simplifies deployment and ensures consistency.

Virtual Environment Setup

On Development Machine

  1. Using pyenv (recommended):
    pyenv install 3.13.5
    pyenv local 3.13.5
    python --version  # Should show 3.13.5
    
  2. Using system Python:
    python3 --version  # Check version
    python3 -m venv venv
    source venv/bin/activate
    
  3. Using setup script:
    ./setup-venv.sh 3.13.5
    source venv/bin/activate
    

On Raspberry Pi

The system Python 3.13.5 is used automatically:

python3 --version  # Should show Python 3.13.5
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Compatibility Notes

The code uses modern Python features that are compatible with Python 3.11+:

All dependencies are compatible with Python 3.11-3.13.

Testing Compatibility

To verify your setup works:

# Check Python version
python3 --version

# Create and activate venv
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run tests
pytest

# Run the application
python3 -m aero_pi_cam.core.main

Troubleshooting

Issue: python3 --version shows a different version than 3.13.5

Issue: Import errors or syntax errors

Issue: Virtual environment not activating