Primer commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
# Ruta que quieres agregar al PYTHONPATH
|
||||
$folderPath = "E:\Fitz_Studio"
|
||||
|
||||
# Obtener el PYTHONPATH actual del entorno de usuario (si existe)
|
||||
$currentPythonPath = [Environment]::GetEnvironmentVariable("PYTHONPATH", "User")
|
||||
|
||||
# Verificar si la ruta ya está incluida
|
||||
if ($currentPythonPath -and $currentPythonPath.Split(';') -contains $folderPath) {
|
||||
Write-Host "La ruta ya está en PYTHONPATH."
|
||||
} else {
|
||||
if ($currentPythonPath) {
|
||||
$newPythonPath = "$folderPath;$currentPythonPath"
|
||||
} else {
|
||||
$newPythonPath = "$folderPath"
|
||||
}
|
||||
|
||||
# Establecer el nuevo PYTHONPATH en el entorno del usuario
|
||||
[Environment]::SetEnvironmentVariable("PYTHONPATH", $newPythonPath, "User")
|
||||
Write-Host "✅ PYTHONPATH actualizado exitosamente. Nuevo valor:"
|
||||
Write-Host $newPythonPath
|
||||
}
|
||||
Reference in New Issue
Block a user