We are using https://github.com/pre-commit/pre-commit-hooks for hooks and this is a really annoying issue This is how I solved it for now (linux only but can be ported to windows) The only requirement is to be in your root folder with the virtualenv activated when you install the hooks this is my shell script in /usr/bin/install_pre_commit_hooks.sh:
#!/bin/bash
pre-commit install