MCPcopy Create free account
hub / github.com/LCBOWER33/StegoScan / install_missing_packages

Function install_missing_packages

StegoScan.py:97–106  ·  view source on GitHub ↗

Ensure all required Python packages are installed in the virtual environment.

()

Source from the content-addressed store, hash-verified

95
96
97def 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
109def install_linux_dependencies():

Callers 1

StegoScan.pyFile · 0.85

Calls 1

get_venv_pythonFunction · 0.85

Tested by

no test coverage detected