def prevent_path_errors(): if 'VIRTUAL_ENV' in os.environ and not check_path(): sys.exit('''ERROR: The virtualenv hasn't been activated correctly. Either the env is corrupted (try running `pew restore env`), Or an upgrade of your Python version broke your env, Or check the contents of your $PATH. You might be adding new directories to it from inside your shell's configuration file. In this case, for further details please see: https://github.com/berdario/pew#the-environment-doesnt-seem-to-be-activated''')