title: Could not find the GDAL library in django. What can I do to resolve this problem?
body: <p>I am working in django project and need to use <code>PointField</code> imported from <code>django.contrib.gis.db.models</code>.</p>
  <p>To use it, I installed GDAL by <code>brew install gdal</code>.</p>
  <p>When I enter <code>gdal-config --version</code> in terminal after installing it, I got the message <code>3.3.1</code>.</p>
  <p>I believe this tells GDAL has been successfully installed.</p>
  <p>I also updated the database setting in <code>settings.py</code> like this.</p>
  <pre><code>DATABASES = {
      'default': {
          &quot;ENGINE&quot;: &quot;django.contrib.gis.db.backends.mysql&quot;,
          'NAME': config(&quot;DB_PROD_NAME&quot;),
          'USER': config(&quot;DB_USER&quot;),
          &quot;PASSWORD&quot;: config(&quot;DB_PASSWORD&quot;),
          &quot;HOST&quot;: config(&quot;DB_HOST&quot;),
          &quot;PORT&quot;: config(&quot;DB_PORT&quot;)
          },
      }
  </code></pre>
  <p>And this is the <code>models.py</code> where <code>PointField</code> is used.</p>
  <pre><code>from django.contrib.gis.db import models
  
  class Address(models.Model):
      address_name = models.CharField(max_length=100)
      address_name_detail = models.CharField(max_length=100)
      address_type = models.CharField(max_length=11)
      address_coord = models.PointField()
      created_at = models.DateTimeField(auto_now_add=True)
      updated_at = models.DateTimeField(auto_now=True)
  
      class Meta:
          managed = False
          db_table = 'address'
  </code></pre>
  <p>The problem is when I try <code>python3 manage.py runserver</code> or import the model Address in <code>views.py</code>,</p>
  <p>I get an error <code>django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried &quot;gdal&quot;, &quot;GDAL&quot;, &quot;gdal3.2.0&quot;, &quot;gdal3.1.0&quot;, &quot;gdal3.0.0&quot;, &quot;gdal2.4.0&quot;, &quot;gdal2.3.0&quot;, &quot;gdal2.2.0&quot;, &quot;gdal2.1.0&quot;, &quot;gdal2.0.0&quot;). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.</code></p>
  <p>By adding</p>
  <pre><code>GDAL_LIBRARY_PATH = config('GDAL_LIBRARY_PATH')
  GEOS_LIBRARY_PATH = config('GEOS_LIBRARY_PATH')
  </code></pre>
  <p>in <code>settings.py</code>, there is no longer error when I enter <code>python3 manage.py runserver</code>, but it is not the case in importing Address model.</p>
  <p>What can I do for this?</p>
  <p>I am using M1 Mackbook Air. Can it be a problem?</p>