Skip to content

Instantly share code, notes, and snippets.

@stnbu
Last active August 29, 2015 14:12
Show Gist options
  • Save stnbu/d0542107b792d56864f1 to your computer and use it in GitHub Desktop.
Save stnbu/d0542107b792d56864f1 to your computer and use it in GitHub Desktop.
How to uninstall all bundled, brewed, pythons and install python, and vim from source
### WARNING: this is only for the incredibly reckless
brew uninstall --force $(brew list | grep python)
chmod a-x /usr/bin/pydoc /usr/bin/python /usr/bin/python-config /usr/bin/pythonw
rm -rf /System/Library/Frameworks/Python.framework /Applications/Python\ 2.7 /Library/Frameworks/Python.framework
deactivate
cd ~/source/cpython
export CPPFLAGS=-I/usr/local/opt/readline/include
export LDFLAGS=-L/usr/local/opt/readline/lib
./configure --prefix=/opt/mpython --enable-framework
#### OMG what a pain!
brew install vim --build-from-source --with-client-server
export CPPFLAGS="-I/usr/local/Cellar/gtk+/2.24.25/include/gtk-2.0 -I/usr/local/Cellar/gtk+/2.24.25/lib/gtk-2.0/include"
export LDFLAGS="-L/usr/local/opt/libffi/lib -L/usr/local/Cellar/gtk+/2.24.25/lib"
export PATH=/opt/mpython/bin:/opt/mvim/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
make distclean
./configure --prefix=/opt/mvim --enable-gui=gtk2 --enable-multibyte --with-tlib=ncurses --enable-cscope --with-features=huge --enable-pythoninterp
make -j3 && make -j3 install
brew uninstall vim # because!
brew reinstall --build-from-source --with-python boost boost-python
cd ~/.vim/bundle/YouCompleteMe
./install.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment