def install(package):
    pip.main(['install', package])
if __name__ == '__main__':
    with open(sys.argv[1]) as f:
        for line in f:
            install(line)
The same list of python libraries for Ubuntu and Windows