[GRASS-dev] GRASS 7: r.in.wms compile failure - ImportError:
cannot import name log
Markus Neteler
neteler at osgeo.org
Tue Jun 2 14:22:17 EDT 2009
On Tue, Jun 2, 2009 at 10:17 AM, Glynn Clements
<glynn at gclements.plus.com> wrote:
> Markus Neteler wrote:
>
>> [neteler at host550 r.in.wms]$ make
>
>> File "/usr/lib64/python2.6/random.py", line 45, in <module>
>> from math import log as _log, exp as _exp, pi as _pi, e as _e,
>> ceil as _ceil
>> ImportError: cannot import name log
>> make: *** [r.in.wms.tmp.html] Error 1
>>
>> Closest discussion seems to be this:
>> http://ubuntuforums.org/archive/index.php/t-897043.html
>>
>> but no idea how to solve it...
>
> I can't reproduce this, but I would guess that you have GRASS' math.py
> in sys.path.
>
> Check that $PYTHONPATH doesn't contain any inappropriate directories,
> and that dist.x86_64-unknown-linux-gnu/etc/python doesn't contain
> anything except the grass subdirectory.
Interestingly it works today. Perhaps I had set $PYTHONPATH indeed
to the swig/python/ directory as suggested in the examples:
grep PYTHONPATH examples/*
examples/m.distance.py: # export PYTHONPATH=/usr/src/grass70/swig/python
examples/rasteraccess.py:export PYTHONPATH=/usr/src/grass70/swig/python
examples/vectoraccess.py:# export PYTHONPATH=/usr/src/grass70/swig/python
In a new terminal it works.
Markus
More information about the grass-dev
mailing list