for pip requirements?

I need to use one instead of a requirements.txt as I have platform specific modules.

import pip

_all_ = [
	"pick == 0.6.4",
	"requests == 2.21.0",
	"riotwatcher == 2.5.0",

windows = ["windows-curses", ]

def install(packages):
	for package in packages:
		pip.main(['install', package])

if __name__ == '__main__':
	from sys import platform
	if platform == 'windows':

However, pip no longer can call the module main. How can I fix this without having to use pip < v9?


Found a way:

from pip._internal import main
main(["install", PackageToInstall])