Skip to content

Instantly share code, notes, and snippets.

@jdiego
Created July 31, 2017 13:51
Show Gist options
  • Save jdiego/d2a4d6b53be4ece3c86a33e0f021f81c to your computer and use it in GitHub Desktop.
Save jdiego/d2a4d6b53be4ece3c86a33e0f021f81c to your computer and use it in GitHub Desktop.
#!/bin/bash
# When you upgrade Python using Homebrew and then run brew cleanup, the symlinks
# in the virtualenv point to paths that no longer exist (because Homebrew deleted them).
env="my-virtual-env"
# The solution is to remove the symlinks in the virtualenv and then recreate them
find ~/.virtualenvs/${env}/ -type l -delete
# Recreating link
virtualenv ~/.virtualenvs/${env}
@jdiego
Copy link
Author

jdiego commented Apr 3, 2018

When you upgrade Python using Homebrew and then run brew cleanup, the symlinks in the virtualenv point to paths that no longer exist (because Homebrew deleted them).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment