Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have recently installed on Mac OS X Lion 10.7.4 the GDAL Framework 1.9 with Python bindings from [][1].

I need to add the following Programs folder to my ~/.bash_profile as described in the ReadMe file:

export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH

This is what's currently on my ~/.bash_profile:

# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
export PATH

What is the right syntax for adding the new path?

I am new with everything (Mac, Python and GDAL) so please excuse me if I wasn't clear.

Many Thanks


share|improve this question

This is a bit off-topic, but it's an easy fix. In the BASH shell, the colon character is used to separate paths in a list, and the ${PATH} evaluates to whatever the PATH environment variable was. So you can either add the GDAL path as a separate line:

export PATH

or put it all on one line:

export PATH

It's entirely up to you: either way, you'll end up with the same path list.

share|improve this answer
Or really put it all on one line: export PATH=... – lynxlynxlynx Jun 11 '12 at 12:34
And don't forget to quote the whole thing, since there's a slight chance the existing path may contain whitespace. – lynxlynxlynx Jun 11 '12 at 12:35
Thanks, very helpful! – aacinelli Jun 13 '12 at 21:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.