python install package from code

40

python install package from code -

import subprocess
import sys

def install(package):
    subprocess.check_call([sys.executable, "-m", "pip", "install", package])

Comments

Submit
0 Comments