crystantine's picture
Upload 25 files
f822d87
raw
history blame contribute delete
352 Bytes
import importlib.util
import subprocess
import sys
def is_installed(package):
try:
spec = importlib.util.find_spec(package)
except ModuleNotFoundError:
return False
return spec is not None
def run_pip(command, desc):
python = sys.executable
subprocess.check_call([python, "-m", "pip", *command.split(" ")])