Problems importing in python

I am super new in python and I just deploy an open source application that was executed in python and I get:

ImportError: cannot import name DataSource on from django.contrib.gis.gdal import DataSource

However, this is fine:

import django.contrib.gis.gdal

My current environment setting:

  • Linux
  • Python 2.7 installed in / opt / python
  • GDAL installed using easy_install, for example, like this: '/ opt / python / bin / easy_install GDAL'
  • Run # 3 looks like it's installed here: '/opt/python/lib/python2.7/site-packages/GDAL-1.7.1-py2.7.egg-info'

Can someone help me here please?

If I could do import django.contribs.gis.gdal, then why DataSourcenot import? I suppose it is DataSourcealso part of the GDAL library?

+3
source share
1 answer

python-gdal? , django.contrib.gis.gdal DataSource, . , Ubuntu python-django python-gdal.

EDIT: , , , , django/contrib/gis/gdal/libgdal.py . (, http://code.djangoproject.com/browser/django/branches/gis/django/contrib/gis/gdal/libgdal.py?rev=8012), GDAL_LIBRARY_PATH, , , , Django .

+3

All Articles