Hi,
some issue:
[neteler@host550 r.in.wms]$ make
if [ "/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/scripts/r.in.wms"
!= "" ] ; then GISRC=/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/demolocation/.grassrc70
GISBASE=/home/neteler/grass70/dist.x86_64-unknown-linux-gnu
PATH="/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/bin:$PATH"
PYTHONPATH="/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/etc/python:$PYTHONPATH"
LD_LIBRARY_PATH="/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/bin:/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/lib:"
LC_ALL=C /home/neteler/grass70/dist.x86_64-unknown-linux-gnu/scripts/r.in.wms
--html-description < /dev/null | grep -v '</body>\|</html>' >
r.in.wms.tmp.html ; fi
Traceback (most recent call last):
File "/home/neteler/grass70/dist.x86_64-unknown-linux-gnu/scripts/r.in.wms",
line 176, in <module>
import tempfile
File "/usr/lib64/python2.6/tempfile.py", line 34, in <module>
from random import Random as _Random
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...
Markus
Markus Neteler wrote:
[neteler@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.
--
Glynn Clements <glynn@gclements.plus.com>
On Tue, Jun 2, 2009 at 10:17 AM, Glynn Clements
<glynn@gclements.plus.com> wrote:
Markus Neteler wrote:
[neteler@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
Markus Neteler wrote:
> 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
Right; that will cause the problem which you reported.
The only GRASS-related directory which should be added to PYTHONPATH
is $GISBASE/etc/python.
--
Glynn Clements <glynn@gclements.plus.com>