op('td_pip').InstallPackage( package_name )
and marvel as PIP opens and downloads the package right into your project.
But this can make problems when the package is refferenced before you had the chance to download the packe. Fear not, the Import_Module function is saving you. The Import_Module function checks first if the module is importable, and if not will just start PIP to download the module and import it afterwards. It is only neccesarry to change the syntax a little bit. From (using qrcode as en example)
you will need to write
qrcode = op('td_pip').Import_Module("qrcode")
If you come arround a package that has a differrent name to the module, use the pip_name optional argument.
socket_io = op('td_pip').Import_Module("socketio", pip_name = "python-socketio")
Best used as an attribute in your extensions.
You can download TD PIP from the Alpha Moonbase OLIB