[Tutor] Problem with Import

Nagendra Singh singh01 at gmail.com
Thu Mar 1 17:18:26 CET 2007


Thanks for the suggestion, the Python path is correct. After a bit of
experimenting I found out that it works with Python 2.3 but not 2.4 but I
have no clue as to why.

Nagendra

On 2/28/07, Jalil <jalilsan at gmail.com> wrote:
>
> check your python path
>
> On 2/28/07, Nagendra Singh <singh01 at gmail.com> wrote:
>
> > Hi all,
> >
> > I am running python on Cygwin and I have also installed gdal which is a
> > raster translator library. When I run the command import gdal, Python gives
> > me an error :
> >
> > Python 2.4.3 (#1, May 18 2006, 07:40:45)
> > [GCC 3.3.3 (cygwin special)] on cygwin
> > Type "help", "copyright", "credits" or "license" for more information.
> > >>> import gdal
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in ?
> >   File "/usr/lib/python2.4/site-packages/gdal.py", line 191, in ?
> >     import _gdal
> > ImportError: No module named _gdal
> >
> > The file gdal.py and gdal.pyc are in : /usr/lib/python2.4/site-packages,
> > but still it gives this error.
> >
> > Thanks
> >
> > Singh
> >
> >
> > _______________________________________________
> > Tutor maillist  -  Tutor at python.org
> > http://mail.python.org/mailman/listinfo/tutor
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070301/54499b18/attachment.html 


More information about the Tutor mailing list