def install_dependencies(feature=None):
    import subprocess
    echo(green('\nInstall dependencies:'))
    echo(green('-' * 40))
    req_path = os.path.realpath(os.path.dirname(__file__) + '/../_requirements')
    if not feature:
        echo(yellow('Please specify a feature to install. \n'))
        for index, item in enumerate(os.listdir(req_path)):
            item = item.replace('.txt', '')
            echo(green('{}. {}'.format(index + 1, item)))
        echo()
        return
    feature_file = feature.lower() + '.txt'
    feature_reqs = os.path.join(req_path, feature_file)
    if not os.path.isfile(feature_reqs):
        msg = 'Unable to locate feature requirements file [{}]'
        echo(red(msg.format(feature_file)) + '\n')
        return
    msg = 'Now installing dependencies for "{}" feature...'.format(feature)
    echo(yellow(msg))
    subprocess.check_call([
        sys.executable, '-m', 'pip', 'install', '-r', feature_reqs]
    )
    reqs = os.path.join(os.getcwd(), 'requirements.txt')
    if os.path.exists(reqs):
        with open(reqs) as file:
            existing = [x.strip().split('==')[0] for x in file.readlines() if x]
        lines = ['\n']
        with open(feature_reqs) as file:
            incoming = file.readlines()
            for line in incoming:
                if not(len(line)) or line.startswith('
                    lines.append(line)
                    continue
                package = line.strip().split('==')[0]
                if package not in existing:
                    lines.append(line)
        with open(reqs, 'a') as file:
            file.writelines(lines)
    echo(green('DONE\n'))