[GRASS-user] Problem installing v.class.mlpy on Mac OS X Lion 10.7.5

Vaclav Petras wenzeslaus at gmail.com
Wed Sep 3 21:14:50 PDT 2014


On Thu, Aug 28, 2014 at 3:08 AM, Christina Ludwig <christina_ludwig at gmx.net>
wrote:

> Hi everyone,
>
> I just started using GRASS GIS and I would like to use the v.class.mlpy
> extension. So I successfully installed numpy, scipy and mlpy and when I
> import them in Python they all seem to work fine. However, when I try to
> install the v.class.mlpy extension using "g.extension
> extension=v.class.mlpy" I get the following error message:
>
> "Cannot import mlpy (http://mlpy.sourceforge.net) library. Please install
> it or ensure that it is on path. (use PYTHONPATH variable)."
>
> The mlpy folder
> (/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mlpy/)
> is on my PYTHONPATH and if I start Python in the terminal and import mlpy
> everything works fine.
>
> If I try to directly import mlpy in the GRASS GIS Python shell I get the
> following message:
>
> Python 2.7.8 (v2.7.8:ee879c0ffa11, Jun 29 2014, 21:07:35)
> [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> import mlpy
> Traceback (most recent call last):
>   File "<input>", line 1, in <module>
>   File
> "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mlpy/__init__.py",
> line 18, in <module>
>     import gsl
> ImportError:
> dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mlpy/gsl.so,
> 2): Symbol not found: _gsl_sf_fact
>   Referenced from:
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mlpy/gsl.so
>   Expected in: flat namespace
>  in
> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mlpy/gsl.so
>
> Does anybody know what might be the problem? I would greatly appreciate
> any help!! :)
>
> I don't know where is the problem. It seems that Python environment is
somehow broken in GRASS session. This might be due to the different ways
how software is installed on Mac.

To understand the problem more, you can try to run python from standard
command line but in GRASS GIS session (i.e. not from the GUI). You can also
check PYTHONPATH environmental variable there. Compare also values of
DYLD_LIBRARY_PATH environmental variable. Also Python variable
sys.executable might be interesting.

Note that there is also v.class.ml module which has richer but different
functionality and can use also scikit-learn library.

http://svn.osgeo.org/grass/grass-addons/grass7/vector/v.class.ml/v.class.ml.html
http://scikit-learn.org/stable/

Vaclav

>
> Cheers,
> Christina
>
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20140904/2a7af58b/attachment.html>


More information about the grass-user mailing list