def install(package):
    pip.main(['install', '--upgrade', '--no-index', '--find-links=.', package])
if __name__ == '__main__':
    pass
Installing Python packages from local file system folder with pip