Installation Guide
System Requirements
Minimum Requirements
- Python: 3.8 or higher
- Operating System: Windows 10+, macOS 10.14+, or Linux (Ubuntu 18.04+)
- Memory: 512 MB RAM
- Storage: 100 MB free space
- Internet: Stable broadband connection
Recommended Requirements
- Python: 3.9 or higher
- Memory: 1 GB RAM
- Storage: 500 MB free space (for logs and cache)
Prerequisites
- Active Spotify account
- YouTube Music subscription (required for playlist creation)
- Spotify Developer Account (free)
- Google Cloud Account (free tier sufficient)
Installation Methods
Method 1: Git Clone (Recommended)
- Install Git (if not already installed):
- Windows: Download from git-scm.com
- macOS:
brew install git
or install Xcode Command Line Tools -
Linux:
sudo apt install git
(Ubuntu/Debian) orsudo yum install git
(CentOS/RHEL) -
Clone the repository:
-
Verify the project structure:
Method 2: Download ZIP
- Download the ZIP file:
- Go to the GitHub repository
-
Click "Code" → "Download ZIP"
-
Extract and navigate:
Python Environment Setup
Step 1: Verify Python Installation
If Python is not installed:
- Windows: Download from python.org
- macOS: brew install python3
or download from python.org
- Linux: sudo apt install python3 python3-pip
(Ubuntu/Debian)
Step 2: Create Virtual Environment
Why use a virtual environment? - Isolates project dependencies - Prevents conflicts with other Python projects - Makes dependency management easier
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Verify activation (should show (venv) in prompt)
which python
Step 3: Install Dependencies
# Upgrade pip first
pip install --upgrade pip
# Install project dependencies
pip install -r requirements.txt
# Verify installation
pip list
Common dependency issues:
-
If
pip install
fails on Windows: -
If
pip install
fails on macOS: -
If
pip install
fails on Linux:
Configuration Setup
Step 1: Environment Variables
-
Copy the example environment file:
-
Edit the
.env
file: -
Basic configuration:
# Spotify API Configuration (Required) SPOTIFY_CLIENT_ID=your_spotify_client_id_here SPOTIFY_CLIENT_SECRET=your_spotify_client_secret_here # Track Matching Configuration (Optional) MATCH_THRESHOLD=0.8 MAX_SEARCH_RESULTS=5 RETRY_ATTEMPTS=3 # Logging Configuration (Optional) LOG_LEVEL=INFO LOG_FILE=spotify_to_youtube.log
Step 2: Spotify API Setup
- Go to Spotify Developer Dashboard:
- Visit developer.spotify.com/dashboard
-
Log in with your Spotify account
-
Create a new app:
- Click "Create App"
- Fill in the details:
- App Name: "Spotify to YouTube Music Transfer"
- App Description: "Personal playlist transfer tool"
- Website: Leave blank or use your GitHub repo URL
- Redirect URI:
http://localhost:8080/callback
-
Accept terms and create
-
Get your credentials:
- Click on your newly created app
- Click "Settings"
- Copy the Client ID and Client Secret
-
Paste them into your
.env
file -
Configure redirect URI:
- In app settings, click "Edit Settings"
- Under "Redirect URIs", add:
http://localhost:8080/callback
- Click "Save"
Step 3: YouTube Music Setup
Option A: OAuth2 Setup (Recommended)
-
Run the automated setup:
-
Follow the guided process:
- The script will open your browser
- You'll be guided through Google Cloud Console setup
-
OAuth2 credentials will be created automatically
-
Manual OAuth2 setup (if automated setup fails):
a. Go to Google Cloud Console: - Visit console.cloud.google.com - Create a new project or select existing one
b. Enable YouTube Data API v3: - Go to "APIs & Services" → "Library" - Search for "YouTube Data API v3" - Click and enable it
c. Create OAuth2 credentials: - Go to "APIs & Services" → "Credentials" - Click "Create Credentials" → "OAuth client ID" - Choose "Desktop application" - Name it "Spotify to YouTube Music Transfer" - Download the JSON file
d. Configure OAuth consent screen: - Go to "APIs & Services" → "OAuth consent screen" - Choose "External" user type - Fill in required fields: - App name: "Spotify to YouTube Music Transfer" - User support email: Your email - Developer contact: Your email - Add your email to test users
e. Save credentials:
- Rename downloaded file to oauth.json
- Place it in the project root directory
Troubleshooting OAuth2 Setup
If you encounter issues with OAuth2:
- Verify Google Cloud Console setup:
- Ensure YouTube Data API v3 is enabled
- Check OAuth2 credentials are for "TVs and Limited Input devices"
-
Confirm redirect URI is set correctly
-
Check environment variables:
-
Regenerate OAuth token if needed:
Verification
Test Your Installation
-
Run the connection test:
-
Expected output:
-
If tests fail:
- Check the Troubleshooting Guide
- Verify your
.env
file configuration - Ensure all authentication files are in place
Test Basic Functionality
-
List your Spotify playlists:
-
List your YouTube Music playlists:
-
Test search functionality:
Post-Installation Setup
Optional: Configure Logging
-
Enable file logging:
-
Create logs directory:
Optional: Shell Aliases
Add convenient aliases to your shell configuration:
# Add to ~/.bashrc, ~/.zshrc, or equivalent
alias syt='cd /path/to/spotify-to-youtube-music && source venv/bin/activate'
alias syt-test='python main.py test'
alias syt-transfer='python main.py transfer'
Optional: Desktop Shortcut
Windows:
1. Create a batch file spotify-youtube-transfer.bat
:
@echo off
cd /d "C:\path\to\spotify-to-youtube-music"
call venv\Scripts\activate
python main.py %*
pause
macOS: 1. Create an Automator application or shell script
Linux:
1. Create a desktop entry in ~/.local/share/applications/
Updating the Tool
Git Update
# Pull latest changes
git pull origin main
# Update dependencies
pip install -r requirements.txt --upgrade
# Test the update
python main.py test
Manual Update
- Download the latest release
- Backup your
.env
file and authentication files - Replace project files
- Restore your configuration files
- Update dependencies
Uninstallation
Complete Removal
-
Deactivate virtual environment:
-
Remove project directory:
-
Revoke API access (optional):
- Spotify: Go to Spotify Account Overview → "Privacy Settings" → "Apps"
- Google: Go to Google Account → "Third-party apps & services"
Partial Removal (Keep Configuration)
-
Backup configuration:
-
Remove project files:
Troubleshooting Installation
Common Issues
"Python not found" - Install Python 3.8+ from python.org - Add Python to your system PATH
"pip not found"
- Reinstall Python with pip included
- Or install pip separately: python -m ensurepip --upgrade
"Permission denied"
- Use virtual environment (recommended)
- Or install with --user
flag: pip install --user -r requirements.txt
"Module not found after installation"
- Ensure virtual environment is activated
- Verify you're in the correct directory
- Check Python path: python -c "import sys; print(sys.path)"
"SSL certificate errors"
- Update certificates: pip install --upgrade certifi
- Or use trusted hosts: pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -r requirements.txt
For more detailed troubleshooting, see the Troubleshooting Guide.
Next Steps
After successful installation:
- Read the API Documentation for advanced usage
- Check the Troubleshooting Guide for common issues
- Start with a small test playlist (5-10 songs)
- Explore different transfer options (new playlist vs. liked music)
- Configure settings to match your preferences
Happy playlist transferring! 🎵➡️🎬