Skip to content

Latest commit

 

History

History
283 lines (204 loc) · 6.15 KB

File metadata and controls

283 lines (204 loc) · 6.15 KB

Installation Guide

This guide provides detailed installation instructions for the YouTube Transcript Keyword Search Tool across different operating systems and environments.

📋 System Requirements

  • Python: 3.7 or higher
  • Operating System: Windows, macOS, or Linux
  • Internet Connection: Required for downloading video transcripts
  • Disk Space: ~50MB for installation and dependencies

🚀 Quick Installation

Option 1: Standard Installation (Recommended)

# Clone the repository
git clone https://github.com/yourusername/youtube-transcript-search.git
cd youtube-transcript-search

# Install dependencies
pip install -r requirements.txt

# Test the installation
python youtube_transcript_search.py --help

Option 2: Direct Download

  1. Download the repository as ZIP from GitHub
  2. Extract to your preferred location
  3. Open terminal/command prompt in the extracted folder
  4. Run: pip install -r requirements.txt

🐍 Python Installation

If you don't have Python installed:

Windows

  1. Download Python from python.org
  2. Important: Check "Add Python to PATH" during installation
  3. Verify installation: python --version

macOS

# Using Homebrew (recommended)
brew install python

# Or download from python.org

Linux (Ubuntu/Debian)

sudo apt update
sudo apt install python3 python3-pip

Linux (CentOS/RHEL)

sudo yum install python3 python3-pip
# or for newer versions
sudo dnf install python3 python3-pip

🛠️ Dependency Installation

Method 1: Using requirements.txt (Recommended)

pip install -r requirements.txt

Method 2: Manual Installation

pip install youtube-transcript-api>=1.2.2

Method 3: Using Conda

# If you use Anaconda/Miniconda
conda create -n youtube-search python=3.9
conda activate youtube-search
pip install -r requirements.txt

🔧 Virtual Environment Setup (Recommended)

Using a virtual environment prevents dependency conflicts:

Using venv (Python 3.3+)

# Create virtual environment
python -m venv youtube-search-env

# Activate (Windows)
youtube-search-env\Scripts\activate

# Activate (macOS/Linux)
source youtube-search-env/bin/activate

# Install dependencies
pip install -r requirements.txt

# When done, deactivate
deactivate

Using conda

# Create environment
conda create -n youtube-search python=3.9

# Activate
conda activate youtube-search

# Install dependencies
pip install -r requirements.txt

🏢 Advanced Installation Options

Option 1: Pip Installable Package

If you want to install as a system-wide command:

# Install in development mode (editable)
pip install -e .

# Now you can use it from anywhere
youtube-transcript-search --help

Option 2: Docker Installation

Create a Dockerfile:

FROM python:3.9-slim

WORKDIR /app

COPY requirements.txt .
RUN pip install -r requirements.txt

COPY youtube_transcript_search.py .

ENTRYPOINT ["python", "youtube_transcript_search.py"]

Build and run:

docker build -t youtube-transcript-search .
docker run -it youtube-transcript-search --help

✅ Verify Installation

Test your installation with these commands:

# Check Python version
python --version

# Test script help
python youtube_transcript_search.py --help

# Test with a sample video
python youtube_transcript_search.py -u "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -k "love" --no-save

Expected output should show the tool processing the video and finding matches.

🔄 Updating

To update to the latest version:

# If installed via git
cd youtube-transcript-search
git pull origin main
pip install -r requirements.txt

# If dependencies updated, reinstall
pip install --upgrade -r requirements.txt

🐛 Troubleshooting

Common Installation Issues

"Python not found"

# Try python3 instead of python
python3 --version
python3 youtube_transcript_search.py --help

"pip not found"

# Try python -m pip instead
python -m pip install -r requirements.txt

"Permission denied" (Linux/macOS)

# Use --user flag
pip install --user -r requirements.txt

# Or use sudo (not recommended)
sudo pip install -r requirements.txt

"Command not found" (Windows)

  • Ensure Python is in your PATH
  • Try using full path: C:\Python39\python.exe
  • Reinstall Python with "Add to PATH" checked

Dependency conflicts

# Use virtual environment (recommended)
python -m venv clean-env
# Activate and install dependencies

# Or create fresh install
pip uninstall youtube-transcript-api
pip install youtube-transcript-api>=1.2.2

Network Issues

If you're behind a corporate firewall:

# Configure pip for proxy
pip install --proxy http://proxy.company.com:port -r requirements.txt

# Or set environment variables
export HTTP_PROXY=http://proxy.company.com:port
export HTTPS_PROXY=http://proxy.company.com:port

Windows-Specific Issues

Long path names:

  • Enable long path support in Windows 10/11
  • Or install closer to root: C:\youtube-search\

PowerShell execution policy:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

🏃‍♂️ First Run

After installation, test with this example:

# Interactive mode
python youtube_transcript_search.py

# CLI mode test
python youtube_transcript_search.py -u "https://www.youtube.com/watch?v=dQw4w9WgXcQ" -k "never" --no-save

If you see search results, your installation is successful! 🎉

📚 Next Steps

  • Read the README.md for usage instructions
  • Check out the examples in the main documentation
  • Try batch processing with multiple videos

🆘 Need Help?

If you're still having issues:

  1. Check you meet the system requirements
  2. Try the troubleshooting steps
  3. Search existing issues
  4. Create a new issue with:
    • Your operating system
    • Python version (python --version)
    • Full error message
    • Steps you tried