Skip to content

Instantly share code, notes, and snippets.

@timofei7
Last active July 18, 2017 08:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timofei7/8390871 to your computer and use it in GitHub Desktop.
Save timofei7/8390871 to your computer and use it in GitHub Desktop.
homebrew install software for GEOG54 (may need babysitting)
#install homebrew
# homebrew (from http://brew.sh) is an opensource software package manager for os x
# very much awesome
# installs into /usr/local so you may want to: mv /usr/local /usr/local.old beforehand
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
# tap extra geog related formulas
brew tap dakcarto/osgeo4mac
brew tap homebrew/science
#setup python path (needed for some prereqs to work right)
echo "export PYTHONPATH=/usr/local/lib/python2.7/site-packages:\$PYTHONPATH" >> ~/.bashrc
source ~/.bashrc
#install some prereqs:
brew install gfortran python sip qscintilla2 pyqt cairo py2cairo postgresql libspatialite postgis
#some python libraries
/usr/local/bin/pip install scipy numpy psycopg2
#just in case
brew uninstall --force gdal
#install some geog stuffs:
brew install r
sudo ln -s "/usr/local/opt/r/R.framework" /Library/Frameworks/
brew install qgis-20
brew linkapps
brew install gdal --complete --with-postgresql
#now in RStudio you can use the brew installed r
#and: install.packages("rgdal", dep=TRUE, type="source")
#will build to use the brew installed gdal
# there may be some confusion with which version of R RStudio is using if previously installed via pkg
# see http://www.rstudio.com/ide/docs/advanced/versions_of_r
# brew prompts when R is installed to link itself into the right place
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment