Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Use PIP from inside script

def install(package):
    try:
        __import__(package)
    except:
        import subprocess
        subprocess.call([sys.executable, "-m", "pip", "install", package, "--prefix="packages"])
.
.
.
sys.path.append("packages/lib/python2.7/site-packages/")
.
.
.
import art
.
.
.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Use #PIP #script
ADD COMMENT
Topic
Name
5+1 =