<reponame>ComplexNetTSP/Network-Analysis-Made-Simple<filename>checkenv.py
# Check that the packages are installed.
import os
from pkgutil import iter_modules

def check_import(packagename):
    if packagename in (name for _, name, _ in iter_modules()):
        return True
    else:
        return False

packages = ['networkx', 'numpy', 'matplotlib', 'circos', 'hiveplot', 'pandas']

for p in packages:
    assert check_import(p), '{0} not present. Please install via pip or conda.'.format(p)

# Check that the packages are installed.
import os
from pkgutil import iter_modules

def check_import(packagename):
    if packagename in (name for _, name, _ in iter_modules()):
        return True
    else:
        return False

packages = ['networkx', 'numpy', 'matplotlib', 'circos', 'hiveplot', 'pandas']

for p in packages:
    assert check_import(p), '{0} not present. Please install via pip or conda.'.format(p)
# Check that the packages are installed.