我收到 Django 的这个错误:
>>> import django.contrib.gis.gdal
>>> print django.contrib.gis.gdal.libgdal.gdal_full_version()
Traceback (most recent call last):
File "<console>", line 1, in <module>
AttributeError: 'module' object has no attribute 'libgdal'
但我有这个:
$ locate libgdal
/usr/local/lib/python2.7/site-packages/django/contrib/gis/gdal/libgdal.py
/usr/local/lib/python2.7/site-packages/django/contrib/gis/gdal/libgdal.pyc
/usr/local/lib/python2.7/site-packages/django/contrib/gis/gdal/libgdal.pyo