File size: 4,329 Bytes
13fd1dd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# TechMatrix Solvers - ISL Translation System
# Windows Setup Script for Dependencies
Write-Host "π TechMatrix Solvers - ISL Translation System" -ForegroundColor Cyan
Write-Host "Setting up Windows environment..." -ForegroundColor Green
# Check Python version
Write-Host "`nπ Checking Python installation..." -ForegroundColor Yellow
try {
$pythonVersion = python --version 2>&1
Write-Host "β
Found: $pythonVersion" -ForegroundColor Green
} catch {
Write-Host "β Python not found. Please install Python 3.8+ first." -ForegroundColor Red
exit 1
}
# Check pip
Write-Host "`nπ¦ Checking pip installation..." -ForegroundColor Yellow
try {
$pipVersion = pip --version 2>&1
Write-Host "β
Found: $pipVersion" -ForegroundColor Green
} catch {
Write-Host "β pip not found. Please install pip first." -ForegroundColor Red
exit 1
}
# Upgrade pip
Write-Host "`nπ Upgrading pip..." -ForegroundColor Yellow
pip install --upgrade pip
# Remove conflicting OpenCV packages
Write-Host "`nπ§Ή Cleaning up conflicting OpenCV packages..." -ForegroundColor Yellow
pip uninstall opencv-python opencv-python-headless opencv-contrib-python -y 2>$null
# Install PyTorch first (CPU version for Windows compatibility)
Write-Host "`nπ§ Installing PyTorch (CPU version)..." -ForegroundColor Yellow
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
# Install OpenCV headless version specifically
Write-Host "`nπΈ Installing OpenCV (headless)..." -ForegroundColor Yellow
pip install opencv-python-headless==4.8.1.78
# Install other core dependencies
Write-Host "`nπ Installing core dependencies..." -ForegroundColor Yellow
pip install streamlit>=1.28.0
pip install numpy>=1.24.0
pip install pandas>=2.0.0
pip install Pillow>=9.0.0
pip install matplotlib==3.5.3
pip install scipy>=1.10.0
pip install scikit-image>=0.20.0
pip install tqdm>=4.65.0
# Install ML/AI dependencies
Write-Host "`nπ€ Installing AI/ML dependencies..." -ForegroundColor Yellow
pip install keras>=2.13.0
pip install seaborn>=0.12.0
pip install huggingface_hub>=0.16.0
# Install media processing
Write-Host "`n㪠Installing media processing..." -ForegroundColor Yellow
pip install av>=10.0.0
pip install ffmpeg-python>=0.2.0
# Check FFmpeg installation
Write-Host "`nπ₯ Checking FFmpeg installation..." -ForegroundColor Yellow
try {
$ffmpegVersion = ffmpeg -version 2>&1 | Select-String "version"
Write-Host "β
FFmpeg found: $($ffmpegVersion -split ' ')[2]" -ForegroundColor Green
} catch {
Write-Host "β οΈ FFmpeg not found. Installing via conda or manually download from https://ffmpeg.org/" -ForegroundColor Yellow
Write-Host " Trying conda install..." -ForegroundColor Yellow
try {
conda install ffmpeg -c conda-forge -y 2>$null
Write-Host "β
FFmpeg installed via conda" -ForegroundColor Green
} catch {
Write-Host "β Please install FFmpeg manually from https://ffmpeg.org/" -ForegroundColor Red
}
}
# Verify installation
Write-Host "`nπ Verifying installation..." -ForegroundColor Yellow
python -c "
import sys
print(f'Python: {sys.version}')
try:
import cv2
print(f'β
OpenCV: {cv2.__version__}')
except Exception as e:
print(f'β OpenCV: {e}')
try:
import streamlit
print(f'β
Streamlit: {streamlit.__version__}')
except Exception as e:
print(f'β Streamlit: {e}')
try:
import torch
print(f'β
PyTorch: {torch.__version__}')
except Exception as e:
print(f'β PyTorch: {e}')
try:
import keras
print(f'β
Keras: {keras.__version__}')
except Exception as e:
print(f'β Keras: {e}')
try:
import numpy as np
print(f'β
NumPy: {np.__version__}')
except Exception as e:
print(f'β NumPy: {e}')
try:
import pandas as pd
print(f'β
Pandas: {pd.__version__}')
except Exception as e:
print(f'β Pandas: {e}')
"
Write-Host "`nπ Setup completed!" -ForegroundColor Cyan
Write-Host "`nTo run the application:" -ForegroundColor Green
Write-Host " streamlit run src/streamlit_app.py" -ForegroundColor White
Write-Host "`nTechMatrix Solvers Team - Ready to translate ISL! π€" -ForegroundColor Cyan |