Skip to content

Instantly share code, notes, and snippets.

@snare
Created April 12, 2016 05:43
Show Gist options
  • Save snare/88bca2a34f00dc6b0fe17679c5082529 to your computer and use it in GitHub Desktop.
Save snare/88bca2a34f00dc6b0fe17679c5082529 to your computer and use it in GitHub Desktop.
import sys
sys.path = [p for p in sys.path if 'Cellar' not in p]
new_path = ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload']
for p in new_path:
if p not in sys.path:
sys.path.append(p)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment