Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,13 +3,13 @@ import subprocess
|
|
3 |
import os
|
4 |
import spaces
|
5 |
|
6 |
-
# Funktion zum Überprüfen und Finden des Blender-Pfads
|
7 |
def find_blender_python():
|
8 |
possible_paths = [
|
9 |
"/usr/share/blender/4.2/python/bin/python3.10",
|
10 |
-
"/usr/
|
11 |
-
"/usr/bin/
|
12 |
-
"/usr/
|
|
|
13 |
]
|
14 |
|
15 |
for path in possible_paths:
|
@@ -17,8 +17,7 @@ def find_blender_python():
|
|
17 |
return path
|
18 |
|
19 |
# Breiterer Fallback-Suchbefehl
|
20 |
-
|
21 |
-
result = subprocess.run(blender_find_cmd, capture_output=True, text=True)
|
22 |
paths = result.stdout.strip().split("\n")
|
23 |
if paths and paths[0] and os.path.exists(paths[0]):
|
24 |
return paths[0]
|
@@ -26,7 +25,7 @@ def find_blender_python():
|
|
26 |
# Debugging: Blender selbst suchen
|
27 |
blender_bin = subprocess.run(["find", "/", "-name", "blender", "-type", "f"], capture_output=True, text=True)
|
28 |
print(f"Blender-Binär gefunden: {blender_bin.stdout}")
|
29 |
-
|
30 |
|
31 |
# Funktion zum Installieren von Infinigen
|
32 |
def install_infinigen():
|
|
|
3 |
import os
|
4 |
import spaces
|
5 |
|
|
|
6 |
def find_blender_python():
|
7 |
possible_paths = [
|
8 |
"/usr/share/blender/4.2/python/bin/python3.10",
|
9 |
+
"/usr/share/blender/3.6/python/bin/python3.10",
|
10 |
+
"/usr/share/blender/3.5/python/bin/python3.10",
|
11 |
+
"/usr/share/blender/3.1/python/bin/python3.10",
|
12 |
+
"/usr/lib/blender/3.1/python/bin/python3.10"
|
13 |
]
|
14 |
|
15 |
for path in possible_paths:
|
|
|
17 |
return path
|
18 |
|
19 |
# Breiterer Fallback-Suchbefehl
|
20 |
+
result = subprocess.run(["find", "/", "-name", "python3.*", "-path", "*/blender/*", "-type", "f"], capture_output=True, text=True)
|
|
|
21 |
paths = result.stdout.strip().split("\n")
|
22 |
if paths and paths[0] and os.path.exists(paths[0]):
|
23 |
return paths[0]
|
|
|
25 |
# Debugging: Blender selbst suchen
|
26 |
blender_bin = subprocess.run(["find", "/", "-name", "blender", "-type", "f"], capture_output=True, text=True)
|
27 |
print(f"Blender-Binär gefunden: {blender_bin.stdout}")
|
28 |
+
raise RuntimeError("Blender Python-Interpreter nicht gefunden!")
|
29 |
|
30 |
# Funktion zum Installieren von Infinigen
|
31 |
def install_infinigen():
|