Created
February 1, 2021 03:09
-
-
Save pashri/a623e08d7ade0c8faa3eb1c1542f3435 to your computer and use it in GitHub Desktop.
Pip install into current environment from within a script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import sys | |
def install(package): | |
subprocess.check_call([sys.executable, "-m", "pip", "install", package]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment