Installation
This guide will help you install tgdl on your system.
Requirements
Before installing tgdl, ensure you have:
- Python 3.7 or higher installed
- pip package manager
- Internet connection
Installation Methods
Method 1: Install from PyPI (Recommended)
The easiest way to install tgdl is using pip:
Method 2: Install with pipx (Isolated)
For a cleaner installation that doesn't interfere with system packages:
# Install pipx first (if not already installed)
pip install pipx
pipx ensurepath
# Install tgdl
pipx install tgdl
Method 3: Install from Source
For the latest development version:
# Clone the repository
git clone https://github.com/kavidu-dilhara/tgdl.git
cd tgdl
# Install in development mode
pip install -e .
Verify Installation
After installation, verify that tgdl is installed correctly:
You should see the version number:
Platform-Specific Instructions
Virtual Environment (Optional)
For isolated installation:
# Create virtual environment
python -m venv telegram-downloader
source telegram-downloader/bin/activate # Linux/macOS
# or
telegram-downloader\Scripts\activate # Windows
# Install tgdl
pip install tgdl
Updating tgdl
To update to the latest version:
To update to a specific version:
Uninstallation
To remove tgdl:
Data Preservation
Uninstalling tgdl does NOT delete:
- Your configuration files (
~/.tgdl/) - Your downloaded files (
downloads/) - Your session data
To remove these manually, delete the .tgdl folder in your home directory.
Dependencies
tgdl automatically installs these dependencies:
- telethon (>=1.42.0) - Telegram client library
- click (>=8.3.0) - CLI framework
- tqdm (>=4.67.1) - Progress bars
- aiofiles (>=25.1.0) - Async file operations
- cryptography (>=43.0.0) - Credential encryption
Troubleshooting Installation
Issue: pip command not found
Solution: Install pip first:
Issue: Permission denied
Solution: Install for user only:
Issue: Command not found after installation
Solution: Add Python scripts directory to PATH (see platform-specific instructions above).
Issue: SSL Certificate Error
Solution: Update pip and certificates:
Next Steps
Now that tgdl is installed, you need to:
Installation Complete!
You're ready to start using tgdl! Continue to the Quick Start guide.