-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcheck_install.ps1
More file actions
70 lines (57 loc) · 2.21 KB
/
check_install.ps1
File metadata and controls
70 lines (57 loc) · 2.21 KB
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
# Quick Installation Check for PDF Tools ComfyUI Node
# Run this from: A:\Comfy25\ComfyUI_windows_portable
Write-Host "================================" -ForegroundColor Cyan
Write-Host "PDF Tools Installation Check" -ForegroundColor Cyan
Write-Host "================================" -ForegroundColor Cyan
Write-Host ""
# Check if we're in the right directory
if (-not (Test-Path ".\python_embeded\python.exe")) {
Write-Host "ERROR: python_embeded\python.exe not found!" -ForegroundColor Red
Write-Host "Please run this script from: A:\Comfy25\ComfyUI_windows_portable" -ForegroundColor Red
exit 1
}
Write-Host "Found Python executable" -ForegroundColor Green
Write-Host ""
# Step 1: Check installations
Write-Host "Checking installed packages..." -ForegroundColor Cyan
Write-Host ""
$packages = @{
"PyMuPDF" = "fitz"
"Pillow" = "PIL"
"numpy" = "numpy"
"opencv-python" = "cv2"
"transformers" = "transformers"
"gallery-dl" = "gallery_dl"
"yt-dlp" = "yt_dlp"
"browser-cookie3" = "browser_cookie3"
}
foreach ($pkg in $packages.GetEnumerator()) {
$name = $pkg.Key
$import = $pkg.Value
Write-Host "Checking $name..." -NoNewline
$check = "import $import; print('OK')"
$result = & .\python_embeded\python.exe -c $check 2>&1
if ($result -match "OK") {
Write-Host " OK" -ForegroundColor Green
} else {
Write-Host " MISSING" -ForegroundColor Yellow
}
}
Write-Host ""
# Step 2: Offer installation
Write-Host "To install all requirements, run:" -ForegroundColor Cyan
Write-Host ".\python_embeded\python.exe -m pip install -r .\ComfyUI\custom_nodes\PDF_tools\requirements.txt" -ForegroundColor White
Write-Host ""
$response = Read-Host "Install now? (y/n)"
if ($response -eq 'y' -or $response -eq 'Y') {
Write-Host ""
Write-Host "Installing packages..." -ForegroundColor Cyan
& .\python_embeded\python.exe -m pip install -r .\ComfyUI\custom_nodes\PDF_tools\requirements.txt
Write-Host ""
Write-Host "Installation complete!" -ForegroundColor Green
} else {
Write-Host "Skipped installation" -ForegroundColor Yellow
}
Write-Host ""
Write-Host "Check INSTALLATION_GUIDE.md for detailed setup instructions" -ForegroundColor Cyan
Write-Host ""