install pip package from python script code example
Example 1: python install module from script
import subprocess
import sys
def install(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", package])
Example 2: install pip in python
python get-pip.py
Example 3: install packages with pip from python
pip3 install <package_name>