On Tue, 6 Sep 2016, Vaclav Petras wrote:

You can try the following commands in and outside of GRASS GIS session:

echo $GRASS_PYTHON
which python
python -c "import sys; print(sys.path)"
python -c "import numpy"

Vaclav,

  External to grass:

$ echo $GRASS_PYTHON

$ which python
/usr/bin/python
$ python -c "import sys; print(sys.path)"
['', '/usr/lib/python2.7/site-packages/python_dateutil-2.2-py2.7.egg',
'/usr/lib/python2.7/site-packages/SQLAlchemy-1.0.8-py2.7-linux-i686.egg',
'/usr/lib/python2.7/site-packages/flake8-2.4.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/mccabe-0.3.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/pep8-1.5.7-py2.7.egg',
'/usr/lib/python2.7/site-packages/pyflakes-0.8.1-py2.7.egg',
'/usr/lib/python2.7/site-packages/gtimelog-0.10.0-py2.7.egg',
'/usr/lib/python27.zip', '/usr/lib/python2.7',
'/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk',
'/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload',
'/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/PIL',
'/usr/lib/python2.7/site-packages/geos',
'/usr/lib/python2.7/site-packages/gtk-2.0',
'/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode']
$ python -c "import numpy"
$

  Using grass72 console:

echo $GRASS_PYTHON
python

which python
/usr/bin/python

python -c "import sys; print(sys.path)"
['', '/usr/lib/python2.7/site-packages/python_dateutil-2.2-py2.7.egg',
 '/usr/lib/python2.7/site-packages/SQLAlchemy-1.0.8-py2.7-linux-i686.egg',
 '/usr/lib/python2.7/site-packages/flake8-2.4.1-py2.7.egg',
 '/usr/lib/python2.7/site-packages/mccabe-0.3.1-py2.7.egg',
 '/usr/lib/python2.7/site-packages/pep8-1.5.7-py2.7.egg',
 '/usr/lib/python2.7/site-packages/pyflakes-0.8.1-py2.7.egg',
 '/usr/lib/python2.7/site-packages/gtimelog-0.10.0-py2.7.egg',
 '/usr/local/grass-7.2.svn/etc/python', '/usr/lib/python27.zip',
 '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages',
 '/usr/lib/python2.7/site-packages/PIL',
 '/usr/lib/python2.7/site-packages/geos',
 '/usr/lib/python2.7/site-packages/gtk-2.0',
 '/usr/lib/python2.7/site-packages/wx-2.8-gtk2-unicode']

python -c "import numpy"
GRASS 7.2.svn


  The environment variable GRASS_PYTHON is set with grass running, but not
otherwise.

Rich

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

Reply via email to