install.py
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| install.py [2025/12/20 15:03] – created 46.109.187.144 | install.py [2025/12/20 15:46] (current) – 46.109.187.144 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | **Palaist: python3 install.py** | ||
| + | |||
| < | < | ||
| - | TER | + | import sys |
| + | import subprocess | ||
| + | |||
| + | def run_command(command, | ||
| + | try: | ||
| + | if use_sudo: | ||
| + | command.insert(0, | ||
| + | subprocess.check_call(command) | ||
| + | print(" | ||
| + | except subprocess.CalledProcessError: | ||
| + | print(" | ||
| + | |||
| + | print(" | ||
| + | run_command([" | ||
| + | |||
| + | # --- System dependencies --- | ||
| + | system_packages = [ | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | |||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | |||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | |||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | |||
| + | for pkg in system_packages: | ||
| + | run_command([" | ||
| + | |||
| + | # --- Python packages (pip) --- | ||
| + | python_pip_packages = [ | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | ] | ||
| + | |||
| + | print(" | ||
| + | for pkg in python_pip_packages: | ||
| + | run_command( | ||
| + | [sys.executable, | ||
| + | ) | ||
| + | |||
| + | # --- Permissions --- | ||
| + | target_folder = "/ | ||
| + | print(f" | ||
| + | run_command([" | ||
| + | |||
| + | # --- UDEV rule for DepthAI camera --- | ||
| + | print(" | ||
| + | depthai_rule = ' | ||
| + | run_command( | ||
| + | [" | ||
| + | use_sudo=True | ||
| + | ) | ||
| + | run_command([" | ||
| + | run_command([" | ||
| + | |||
| + | print(" | ||
| </ | </ | ||
install.py.1766243029.txt.gz · Last modified: by 46.109.187.144 · Currently locked by: 216.73.216.181
