Add Telegram Bot Fix Guide and dependency installer

This commit is contained in:
cbazza committed 2025-12-26 20:14:36 +01:00
1 parent 9475730769
commit f537a16fd3
2 files changed
+255

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
#!/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")