#!/usr/bin/env python3 """ Quick installer for telegram dependencies in notebook environment """ import subprocess import sys print("="*70) print("๐Ÿ“ฆ Installing Telegram Dependencies for Notebook") print("="*70) # Install python-telegram-bot print("\n๐Ÿ“ฅ Installing python-telegram-bot...") try: subprocess.check_call([ sys.executable, "-m", "pip", "install", "python-telegram-bot==13.15", "--upgrade" ]) print("โœ… python-telegram-bot installed successfully!") except Exception as e: print(f"โŒ Installation failed: {e}") sys.exit(1) # Verify installation print("\n๐Ÿงช Verifying installation...") try: import telegram from telegram import Bot from telegram.ext import Updater print(f"โœ… telegram module imported successfully!") print(f" Version: {telegram.__version__}") except Exception as e: print(f"โŒ Verification failed: {e}") sys.exit(1) print("\n" + "="*70) print("โœ… ALL DEPENDENCIES INSTALLED!") print("="*70) print("\n๐Ÿ“ Next step: Run Cell 28 in your notebook again")