JPKay wrote:
>   
>> Oh, I thought you were using python26.  Rebuild gdal-py25 then, and
>> check the package contents via "dpkg -L gdal-py25"
>>     
>
>
>
> OK, I have done that, but I am seeing that there are files that contain the
> .py25 extension. 
> This is the output from the "dpkg -L gdal-py25". This does not seem to have
> done anything, because I am still getting the same error. 
>
> /.
> /sw
> /sw/bin
> /sw/bin/epsg_tr.py25
> /sw/bin/esri2wkt.py25
> /sw/bin/gcps2vec.py25
> /sw/bin/gcps2wld.py25
> /sw/bin/gdal2tiles.py25
> /sw/bin/gdal2xyz.py25
> /sw/bin/gdal_merge.py25
> /sw/bin/gdal_polygonize.py25
> /sw/bin/gdal_proximity.py25
> /sw/bin/gdal_retile.py25
> /sw/bin/gdal_sieve.py25
> /sw/bin/gdalchksum.py25
> /sw/bin/gdalident.py25
> /sw/bin/gdalimport.py25
> /sw/bin/mkgraticule.py25
> /sw/bin/pct2rgb.py25
> /sw/bin/rgb2pct.py25
> /sw/lib
> /sw/lib/python2.5
> /sw/lib/python2.5/site-packages
> /sw/lib/python2.5/site-packages/GDAL-1.6.0-py2.5.egg-info
> /sw/lib/python2.5/site-packages/gdal.py
> /sw/lib/python2.5/site-packages/gdal.pyc
> /sw/lib/python2.5/site-packages/gdalconst.py
> /sw/lib/python2.5/site-packages/gdalconst.pyc
> /sw/lib/python2.5/site-packages/gdalnumeric.py
> /sw/lib/python2.5/site-packages/gdalnumeric.pyc
> /sw/lib/python2.5/site-packages/ogr.py
> /sw/lib/python2.5/site-packages/ogr.pyc
> /sw/lib/python2.5/site-packages/osgeo
> /sw/lib/python2.5/site-packages/osgeo/__init__.py
> /sw/lib/python2.5/site-packages/osgeo/__init__.pyc
> /sw/lib/python2.5/site-packages/osgeo/_gdal.so
> /sw/lib/python2.5/site-packages/osgeo/_gdal_array.so
> /sw/lib/python2.5/site-packages/osgeo/_gdalconst.so
> /sw/lib/python2.5/site-packages/osgeo/_ogr.so
> /sw/lib/python2.5/site-packages/osgeo/_osr.so
> /sw/lib/python2.5/site-packages/osgeo/gdal.py
> /sw/lib/python2.5/site-packages/osgeo/gdal.pyc
> /sw/lib/python2.5/site-packages/osgeo/gdal_array.py
> /sw/lib/python2.5/site-packages/osgeo/gdal_array.pyc
> /sw/lib/python2.5/site-packages/osgeo/gdalconst.py
> /sw/lib/python2.5/site-packages/osgeo/gdalconst.pyc
> /sw/lib/python2.5/site-packages/osgeo/gdalnumeric.py
> /sw/lib/python2.5/site-packages/osgeo/gdalnumeric.pyc
> /sw/lib/python2.5/site-packages/osgeo/ogr.py
> /sw/lib/python2.5/site-packages/osgeo/ogr.pyc
> /sw/lib/python2.5/site-packages/osgeo/osr.py
> /sw/lib/python2.5/site-packages/osgeo/osr.pyc
> /sw/lib/python2.5/site-packages/osr.py
> /sw/lib/python2.5/site-packages/osr.pyc
> /sw/share
> /sw/share/doc
> /sw/share/doc/gdal-py25
> /sw/share/doc/gdal-py25/COMMITERS
> /sw/share/doc/gdal-py25/HOWTO-RELEASE
> /sw/share/doc/gdal-py25/LICENSE.TXT
> /sw/share/doc/gdal-py25/PROVENANCE.TXT
> /sw/share/doc/gdal-py25/README.txt
> /sw/share/doc/gdal-py25/VERSION
>
> Thanks,
> Jon
>
>   
It works here.   There are a couple of things to check:

1)  If you run "ipython", then what version does it come back with?  If
your 'ipython' is pointing to the python26 version, rather than the
python25 one, that might cause trouble.  For example, I have
ipython-py25 and ipython-py26 installed, so I get:

$ ipython2.5
Python 2.5.4 (r254:67916, Mar 17 2009, 03:17:29)
Type "copyright", "credits" or "license" for more information.

IPython 0.9.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]: from osgeo import ogr

In [2]: list
Out[2]: <type 'list'>

In [3]: ogr
Out[3]: <module 'osgeo.ogr' from
'/sw/lib/python2.5/site-packages/osgeo/ogr.pyc'>

In [4]:

$ ipython
/sw/lib/python2.6/site-packages/IPython/Magic.py:38: DeprecationWarning:
the sets module is deprecated
  from sets import Set
Python 2.6.2 (r262:71600, May 14 2009, 03:21:35)
...

because the "ipython" executable points at ipython-py26

Also, see what you get from running:

    import sys; print sys.path

under ipython.  I get

$ ipython2.5
Python 2.5.4 (r254:67916, Mar 17 2009, 03:17:29)
Type "copyright", "credits" or "license" for more information.

IPython 0.9.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object'. ?object also works, ?? prints more.

In [1]: import sys; print sys.path
['', '/sw/bin', '/sw/lib/python25.zip', '/sw/lib/python2.5',
'/sw/lib/python2.5/plat-darwin', '/sw/lib/python2.5/plat-mac',
'/sw/lib/python2.5/plat-mac/lib-scriptpackages',
'/sw/lib/python2.5/lib-tk', '/sw/lib/python2.5/lib-dynload',
'/sw/lib/python2.5/site-packages',
'/sw/lib/python2.5/site-packages/Numeric',
'/sw/lib/python2.5/site-packages/PIL',
'/sw/lib/python2.5/site-packages/gtk-2.0',
'/sw/lib/python2.5/site-packages/IPython/Extensions',
'/Users/hansen/.ipython']

-- 
Alexander Hansen
Fink User Liaison


------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Fink-beginners mailing list
[email protected]
http://news.gmane.org/gmane.os.apple.fink.beginners

Reply via email to