Every python script installed in the ./bin/ directory of a Python virtualenv installation has a shebang pointing to the absolute path of the python binary in the virtualenv. That’s important to assure that those scripts will only be executed with the correct python binary.

However, when a Python virtualenv is moved to another directory all those scripts end up outdated.

To fix that, all that’s necessary to do is:

virtualenv --relocatable ./path/to/virtualenv/dir/