Skip to content

Installation

Requirements

  • Python 3.8 or higher
  • FFmpeg (for media processing)
  • A Telegram account and API credentials

System Dependencies

Ubuntu/Debian

sudo apt update
sudo apt install ffmpeg libopus-dev libffi-dev libnacl-dev python3-dev gcc

CentOS/RHEL/Fedora

sudo dnf install ffmpeg opus-devel libffi-devel libsodium-devel python3-devel gcc

macOS

brew install ffmpeg opus libffi libsodium

Windows

  1. Download FFmpeg from https://ffmpeg.org/download.html
  2. Add FFmpeg to your system PATH
  3. Install Microsoft Visual C++ Build Tools

Python Package Installation

Basic Installation

pip install tgcaller

With Media Support

pip install tgcaller[media]

With Audio Processing

pip install tgcaller[audio]

With Advanced Features

pip install tgcaller[advanced]

Complete Installation

pip install tgcaller[all]

Verify Installation

# Test installation
tgcaller test

# Check system info
tgcaller info

Expected Output:

๐Ÿงช Testing TgCaller installation...
โœ… Pyrogram imported successfully
โœ… TgCaller types imported successfully
๐ŸŽ‰ TgCaller installation test completed successfully!

Getting API Credentials

  1. Go to my.telegram.org
  2. Log in with your phone number
  3. Go to "API Development Tools"
  4. Create a new application
  5. Note down your api_id and api_hash

Docker Installation

FROM python:3.11-slim

# Install system dependencies
RUN apt-get update && apt-get install -y \
    ffmpeg \
    libopus-dev \
    libffi-dev \
    libnacl-dev \
    python3-dev \
    gcc \
    && rm -rf /var/lib/apt/lists/*

# Install TgCaller
RUN pip install tgcaller[all]

# Copy your bot
COPY . /app
WORKDIR /app

CMD ["python", "bot.py"]

Troubleshooting

Common Issues

FFmpeg not found

# Check if FFmpeg is installed
ffmpeg -version

# If not installed, install it using your package manager

Permission errors on Linux

# Install in user directory
pip install --user tgcaller

Build errors on Windows

  • Install Microsoft Visual C++ Build Tools
  • Use pre-compiled wheels: pip install --only-binary=all tgcaller

Import errors

# Reinstall with all dependencies
pip uninstall tgcaller
pip install tgcaller[all]

Getting Help

If you encounter issues:

  1. Check the GitHub Issues
  2. Join our Telegram Group
  3. Read the troubleshooting guide

Development Installation

For contributing to TgCaller:

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

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e ".[dev]"

# Run tests
pytest tests/ -v