-
Notifications
You must be signed in to change notification settings - Fork 0
/
pipdeps.js
31 lines (27 loc) · 886 Bytes
/
pipdeps.js
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
import { exec } from 'child_process';
function runCommand(command, description) {
return new Promise((resolve, reject) => {
console.log(`Ejecutando: ${description}...`);
exec(command, (error, stdout, stderr) => {
if (error) {
console.error(`Error al ejecutar ${description}:`, error);
reject(error);
return;
}
if (stderr) {
console.error(`Stderr al ejecutar ${description}:`, stderr);
}
console.log(`Resultado de ${description}:`, stdout);
resolve(stdout);
});
});
}
// Agregar mas lineas para mas paquetes
async function installPythonDependencies() {
try {
await runCommand('pip install -U --pre "yt-dlp[default]"', 'Instalando YT-DLP');
} catch (error) {
console.error('Error Instalando Modulos Opcionales, Algunos Plugins No Funcionaran.', error);
}
}
installPythonDependencies();