I wrote a package to do this, once the package pkgman
is installed:
from pkgman import include
include("numpy")
from pkgman import include
include(["numpy", "pandas"])
To me, this wrapper is super helpful when I need to do data analysis, in which, requirements are constantly changing & always need to install and then import new ones.
To start using this module, just pip install pkgman
.
Opensourced at https://github.com/reycn/pkgman