Ensure all required Python packages are installed in the virtual environment.
()
| 95 | |
| 96 | |
| 97 | def install_missing_packages(): |
| 98 | """Ensure all required Python packages are installed in the virtual environment.""" |
| 99 | python_exec = get_venv_python() |
| 100 | for module, package in required_packages.items(): |
| 101 | try: |
| 102 | subprocess.run([python_exec, "-c", f"import {module}"], check=True, stdout=subprocess.DEVNULL, |
| 103 | stderr=subprocess.DEVNULL) |
| 104 | except subprocess.CalledProcessError: |
| 105 | print(f"Installing missing package: {package}...") |
| 106 | subprocess.check_call([python_exec, "-m", "pip", "install", package]) |
| 107 | |
| 108 | |
| 109 | def install_linux_dependencies(): |
no test coverage detected