In [1]:
import importlib
In [2]:
working_libs = ["jupyterlab"]
basic_libs = ["numpy", "pandas"]
ml_libs = ["sklearn", "joblib"]
vis_libs = ["matplotlib", "seaborn", "altair", "plotnine", "modelvis", "yellowbrick"]
In [3]:
libs = working_libs + basic_libs + ml_libs + vis_libs
In [4]:
def get_version(libs):
for lib in libs:
module = importlib.import_module(lib)
ver = getattr(module, "__version__")
print(ver, "\t ", lib)
In [5]:
get_version(libs)
In [6]:
lib_rqmt = []
def requirements(libs):
for lib in libs:
module = importlib.import_module(lib)
ver = getattr(module, "__version__")
lib_ver = "- "+lib+">="+ver
lib_rqmt.append(lib_ver)
print(lib_ver)
In [7]:
requirements(libs)
In [8]:
lib_rqmt
Out[8]:
In [ ]: