ImportError: No module named lib

3 messages Options
Embed this post
Permalink
Rusiru Boteju

ImportError: No module named lib

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
i get this
"ImportError: No module named lib"
when i try to run the code in http://grass.osgeo.org/wiki/GRASS_and_Python#Python-SWIG_examples
can any one help me :(


_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Glynn Clements

Re: ImportError: No module named lib

Reply Threaded More More options
Print post
Permalink

[CC to grass-dev]

Rusiru Boteju wrote:

> i get this
> "ImportError: No module named lib"
> when i try to run the code in http://grass.osgeo.org/wiki/GRASS_and_Python#Python-SWIG_examples 
> can any one help me :(

First, ensure that you don't have a file named grass.py in the current
directory (e.g. ensure that the swig/python directory isn't the
current directory).

Python always checks the current directory before $PYTHONPATH, so it
gets confused if the current directory contains a module with the same
name as a package.

I'm wondering whether grass.lib.grass (i.e. the bindings for libgis)
should be renamed (to e.g. gis, general, or core) to avoid confusion.

--
Glynn Clements <[hidden email]>
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user
Markus Neteler

Re: ImportError: No module named lib

Reply Threaded More More options
Print post
Permalink
On Mon, Oct 19, 2009 at 3:22 PM, Glynn Clements
<[hidden email]> wrote:
>
> [CC to grass-dev]
>
> Rusiru Boteju wrote:
>
>> i get this
>> "ImportError: No module named lib"
>> when i try to run the code in http://grass.osgeo.org/wiki/GRASS_and_Python#Python-SWIG_examples
>> can any one help me :(
...
> I'm wondering whether grass.lib.grass (i.e. the bindings for libgis)
> should be renamed (to e.g. gis, general, or core) to avoid confusion.

"core" for libgis seems to make a lot of sense.
So: grass.lib.core

Markus
_______________________________________________
grass-user mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/grass-user