Maybe 
try:
    flake8.engine.get_style_guide(parse_argv=False, config_file=True)
except ImportError: 
    print("You need to install flake8")