Skip to content

Commit 7884e42

Browse files
committed
Preload opencv at setup
Avoids a long hang when first running the simulator
1 parent a877732 commit 7884e42

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ def populate_python_config(runtime_ini: Path, venv_python: Path) -> None:
9999
cwd=venv_dir,
100100
)
101101

102+
logger.info("Preloading OpenCV")
103+
check_call([str(venv_python), "-c", "import cv2"], cwd=venv_dir)
104+
102105
logger.info("Setting up Webots Python location")
103106

104107
controllers_dir = project_root / "simulator/controllers"

0 commit comments

Comments
 (0)