Last active
July 13, 2020 11:15
-
-
Save JasonCrowe/8d237a6d302bc8ec9764a0edfb60bd70 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from subprocess import call | |
from pkgutil import iter_modules | |
def install_package(name): | |
if name not in [tuple_[1] for tuple_ in iter_modules()]: | |
print(f"Installing {name} Library for Python") | |
call(["pip", "install", name]) | |
packages = ['selenium', 'requests', 'pandas', 'xlrd', 'xlwt', 'openpyxl', 'parsel'] | |
[install_package(x) for x in packages] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment