Created
March 6, 2025 18:11
-
-
Save twobob/7b11ef9b87e1ad2f30b43a6e2c2a46d2 to your computer and use it in GitHub Desktop.
"import cv2, mediapipe" tester for conda envs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conda env list --json | python -c "import json,sys,subprocess as sp; from pathlib import Path; envs=json.load(sys.stdin)['envs']; [print(e, 'HAS cv2+mediapipe' if sp.run([str(Path(e, 'python.exe')), '-c', 'import cv2, mediapipe'], stdout=sp.DEVNULL, stderr=sp.DEVNULL).returncode==0 else 'DOES NOT') for e in envs]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment