Created
July 31, 2017 13:51
-
-
Save jdiego/d2a4d6b53be4ece3c86a33e0f021f81c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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).