After upgrading Python, the virtualenv Python symlinks sometimes break.
This will manifest as an error when invoking Python within the target virtualenv.
This script walks through each virtualenv directory searching for broken links. It
will recreate the virtualenv if necessary. It is intended to work with a virtualenvwrapper
managed environment in which all virtual environments are centralized under a specific directory.
Assumptions:
- Virtual environments collected under
$HOME/.virtualenvs/
- GNU compatible
find
is calledgfind
. virtualenv
command is located at/usr/local/bin/virtualenv