Installation Guide

This guide covers installation of CLoPy on your system. Choose the appropriate section based on your experiment type (CLNF or CLMF).

Platform Requirements

  • CLNF: Raspberry Pi 4B+ (recommended)
  • CLMF: Nvidia Jetson Orin with GPU (required for DeepLabCut-Live)

Prerequisites

Step 1: Create Environment

conda create -n clopy
conda activate clopy

Step 2: Install Core Dependencies

pip3 install opencv-python tables cvui roipoly scipy pandas joblib pillow videofig imutils

Step 3: Install Audio Dependencies

Install PyAudio

Linux (Debian/Ubuntu)

sudo apt-get install portaudio19-dev python3-pyaudio
pip3 install PyAudio

macOS

brew install portaudio
pip3 install PyAudio

Windows

Download PyAudio from Christophe Gauthier's site or use:

pip3 install PyAudio

Install Audiostream

Linux (Debian/Ubuntu)

sudo apt-get install libsdl1.2-dev
sudo apt-get install libsdl-mixer1.2-dev
pip3 install cython==0.29.21
pip3 install kivy

macOS/Windows

Follow Kivy installation guide

# Clone audiostream repository
git clone https://github.com/kivy/audiostream.git
cd audiostream
python setup.py install

Step 4: Install Hardware-Specific Dependencies

For CLNF (Raspberry Pi)

pip3 install gpiozero Adafruit-Blinka adafruit-circuitpython-mpr121

For CLMF (Jetson Orin)

pip install deeplabcut-live

DeepLabCut-Live

Please check the DeepLabCut-Live GitHub page for the latest installation instructions and TensorFlow version requirements.

Step 5: Clone CLoPy Repository

cd ~
git clone https://github.com/pankajkgupta/clopy.git
cd clopy

Step 6: Configure Hardware

Raspberry Pi I2C Setup

  1. Enable I2C interface: bash sudo raspi-config Navigate to Interface OptionsI2CEnable

  2. Install I2C tools: bash sudo apt-get install i2c-tools

Arduino Setup (for CLMF)

  • Connect Arduino via USB
  • Note the serial port (typically /dev/ttyACM0)

Verification

Test your installation:

import cv2
import numpy as np
from configparser import ConfigParser

print("Core packages imported successfully!")

Next Steps