Use venv for python script

This commit is contained in:
clsty
2025-10-07 14:51:45 +08:00
parent 91b55ad2af
commit 5385a4834a
3 changed files with 88 additions and 1 deletions
@@ -325,7 +325,9 @@ main() {
detect_scheme_type_from_image() {
local img="$1"
source "$(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate"
"$SCRIPT_DIR"/scheme_for_image.py "$img" 2>/dev/null | tr -d '\n'
deactivate
}
while [[ $# -gt 0 ]]; do
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env -S\_/bin/sh\_-c\_"source\_\$(eval\_echo\_\$ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate&&exec\_python\_-E\_"\$0"\_"\$@""
import argparse
import cv2