Installing libraries via PIP

The following script will execute PIP functionality from within the IDLE utility.

import pip

print("== Python module collector ==")
request = input("What module(s) would you like me to collect? ")
ver = int(pip.__version__.split(".")[0])
args = "install --user "+request
print(ver)

if ver < 10:
    pip.main(args.split())
else:
    import pip._internal
    pip._internal.main(args.split())

print()
print("You will need to completely close all Python windows and reopen for the change to take effect")
print()