title: Heroku GeoDjango issues with missing GDAL (and possibly GEOS)
body: <p>I'm working on a GeoDjango application and am using Heroku (with a Heroku-16 stack) as my platform. </p>
  
  <p>I am following the instructions found <a href="https://devcenter.heroku.com/articles/python-c-deps#geodjango-application-libraries" rel="noreferrer">here</a>, which specify the following:</p>
  
  <blockquote>
    <p>If your application requires geo libraries, experimental support for a handful of these libraries are available:</p>
    
    <ul>
    <li>GDAL v2.2.1 (v1.11.5 for cedar-14)</li>
    <li>Geos v3.6.2 (v3.4.2 for cedar-14)</li>
    <li>Proj v4.9.3 (v4.8.0 for cedar-14)</li>
    </ul>
    
    <p>To make these libraries available to your application, simply set the BUILD_WITH_GEO_LIBRARIES environment variable:</p>
  </blockquote>
  
  <pre><code>$ heroku config:set BUILD_WITH_GEO_LIBRARIES=1
  </code></pre>
  
  <blockquote>
    <p>During your next build, these libraries will be downloaded and installed.
    In your Django settings.py, also add the following:</p>
  </blockquote>
  
  <pre><code>import dj_database_url
  DATABASES['default'] = dj_database_url.config()
  DATABASES['default']['ENGINE'] = 
  'django.contrib.gis.db.backends.postgis'
  
  GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')
  GEOS_LIBRARY_PATH = os.getenv('GEOS_LIBRARY_PATH')
  </code></pre>
  
  <blockquote>
    <p>This will ensure that Django can find the GEOS libraries that are installed.</p>
  </blockquote>
  
  <p>I have set the env variables in Heroku:</p>
  
  <p><a href="https://i.stack.imgur.com/ZYYWq.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ZYYWq.png" alt="image"></a></p>
  
  <p>However, I have found that this isn't making a difference when it's time to deploy:</p>
  
  <pre><code>2017-09-23T19:29:55.142378+00:00 app[web.1]:     % '", "'.join(lib_names)
  2017-09-23T19:29:55.142414+00:00 app[web.1]: 
  django.core.exceptions.ImproperlyConfigured: Could not find the GDAL 
  library (tried "gdal", "GDAL", "gdal2.1.0", "gdal2.0.0", "gdal1.11.0", 
  "gdal1.10.0", "gdal1.9.0"). Is GDAL installed? If it is, try setting 
  GDAL_LIBRARY_PATH in your settings.
  </code></pre>
  
  <p>Here's my requirements.txt:</p>
  
  <pre><code>dj-database-url==0.4.1
  Django==1.11.5
  gunicorn==19.6.0
  psycopg2==2.6.2
  pytz==2017.2
  whitenoise==3.2
  </code></pre>
  
  <p>The only anomaly I have here is that I'm using Django 1.11.5 instead of what the default was with Heroku's Django project template, which is 1.11.1. This was to fix a problem that kept the project from working that was patched.</p>
  
  <p>Procfile is:</p>
  
  <pre><code>web: gunicorn tagging_tracker_backend.wsgi
  </code></pre>
  
  <p>runtime.txt is:</p>
  
  <pre><code>python-3.6.2
  </code></pre>
  
  <p>The Github repo is at <a href="https://github.com/Nerdenator/tagging-tracker-backend" rel="noreferrer">this</a> link.</p>