[GRASS-dev] wxpython/iclass fails to compile, missing numpy.oldnumeric

For both G70 and trunk, /osgeo/grass7_trunk/gui/wxpython/iclass fails to compile:

   ImportError: NumPy not found.

       This module requires the NumPy module, which could not be
       imported. It probably is not installed (it's not part of the
       standard Python distribution). See the Numeric Python site
       (http://numpy.scipy.org) for information on downloading source or
       binaries.

Reading http://docs.scipy.org/doc/numpy-dev/release.html, oldnumeric does not exist anymore. Working with NumPy 1.9 under Funtoo-Linux here.

Does this worth a ticket?

--
Nikos

On Sun, Nov 9, 2014 at 6:02 PM, Nikos Alexandris
<nik@nikosalexandris.net> wrote:

For both G70 and trunk, /osgeo/grass7_trunk/gui/wxpython/iclass fails to
compile:

  ImportError: NumPy not found.

      This module requires the NumPy module, which could not be
      imported. It probably is not installed (it's not part of the
      standard Python distribution). See the Numeric Python site
      (http://numpy.scipy.org) for information on downloading source or
      binaries.

Reading http://docs.scipy.org/doc/numpy-dev/release.html, oldnumeric does
not exist anymore. Working with NumPy 1.9 under Funtoo-Linux here.

Does this worth a ticket?

I can compile GRASS 7 successfully on Fedora 20
(numpy-1.8.2-1.fc20.x86_64) and Scientific Linux 6.4
(numpy-1.6.1-2.el6.x86_64).
What is the relationship of numpy's oldnumeric and GRASS 7? Any error messages?

Markus

Nikos Alexandris

For both G70 and trunk, /osgeo/grass7_trunk/gui/wxpython/iclass fails to
compile:

--%<---

  ImportError: NumPy not found.

      This module requires the NumPy module, which could not be
      imported. It probably is not installed (it's not part of the
      standard Python distribution). See the Numeric Python site
      (http://numpy.scipy.org) for information on downloading source or
      binaries.

--->%--

Reading http://docs.scipy.org/doc/numpy-dev/release.html, oldnumeric does
not exist anymore. Working with NumPy 1.9 under Funtoo-Linux here.

Does this worth a ticket?

Markus Neteler wrote:

I can compile GRASS 7 successfully on Fedora 20
(numpy-1.8.2-1.fc20.x86_64) and Scientific Linux 6.4
(numpy-1.6.1-2.el6.x86_64).
What is the relationship of numpy's oldnumeric and GRASS 7? Any error messages?

Yes, the above. Ehh.. maybe not related to G7 directrly? Complete msg:

Traceback (most recent call last):
   File "/osgeo/grass7_trunk/dist.x86_64-unknown-linux-gnu/scripts/g.gui.iclass", line 62, in <module>
     from iclass.frame import IClassMapFrame
   File "/osgeo/grass7_trunk/dist.x86_64-unknown-linux-gnu/gui/wxpython/iclass/frame.py", line 61, in <module>
     from iclass.plots import PlotPanel
   File "/osgeo/grass7_trunk/dist.x86_64-unknown-linux-gnu/gui/wxpython/iclass/plots.py", line 19, in <module>
     import wx.lib.plot as plot
   File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/lib/plot.py", line 126, in <module>
     raise ImportError, "NumPy not found.\n" + msg
ImportError: NumPy not found.

     This module requires the NumPy module, which could not be
     imported. It probably is not installed (it's not part of the
     standard Python distribution). See the Numeric Python site
     (http://numpy.scipy.org) for information on downloading source or
     binaries.

Nikos

Hi Nikos,

On Sun, Nov 9, 2014 at 8:23 PM, Nikos Alexandris
<nik@nikosalexandris.net> wrote:

Yes, the above. Ehh.. maybe not related to G7 directrly? Complete msg:

I don't think is related to GRASS, please have a look at previous
thread on the topic:

http://lists.osgeo.org/pipermail/grass-dev/2014-October/071126.html

Good night

Pietro

Markus Neteler wrote:

What is the relationship of numpy's oldnumeric and GRASS 7?

It's an issue with the wx.lib.plot module in wxPython. It wants a
"numeric" module, for which it tries:

try:
    import numpy.oldnumeric as _Numeric
except:
    try:
        import numarray as _Numeric #if numarray is used it is renamed Numeric
    except:
        try:
            import Numeric as _Numeric
        except:
            msg= """
            This module requires the Numeric/numarray or NumPy module,
            which could not be imported. It probably is not installed
            (it's not part of the standard Python distribution). See the
            Numeric Python site (http://numpy.scipy.org) for information on
            downloading source or binaries."""
            raise ImportError, "Numeric,numarray or NumPy not found. \n" + msg

Essentially, it tries three options from newest to oldest. But even
the newest is old enough that it's commonly unavailable (the
oldnumeric module was removed from NumPy in version 1.9).

Code should now be using the numpy interface. Apparently wxPython has
only recently done this:

  http://trac.wxwidgets.org/ticket/16590

--
Glynn Clements <glynn@gclements.plus.com>

On 10.11.2014 00:26, Pietro wrote:

Hi Nikos,

On Sun, Nov 9, 2014 at 8:23 PM, Nikos Alexandris
<nik@nikosalexandris.net> wrote:

Yes, the above. Ehh.. maybe not related to G7 directrly? Complete msg:

I don't think is related to GRASS, please have a look at previous
thread on the topic:

http://lists.osgeo.org/pipermail/grass-dev/2014-October/071126.html

Thanks Pietro, I had a look.

The problem for my box is not the version of wxwidgets. I have both ver. 2.8 and 3.0 and can easily switch between them when compiling a packages (Gentoo/Funtoo's eselect tool). Removing numpy 1.9.x and installing 1.8.SomeThing, results in an error-free compilation.

If I can translate this correctly, anything that uses "oldnumeric", will be a problem. NumPy 1.9 dropped support for it. In this case, g.gui.iclass.py uses something that uses (something that uses?) oldnumeric. This will stop working at some point.

Nikos

On 10.11.2014 09:05, Glynn Clements wrote:

Markus Neteler wrote:

What is the relationship of numpy's oldnumeric and GRASS 7?

It's an issue with the wx.lib.plot module in wxPython. It wants a
"numeric" module, for which it tries:

try:
    import numpy.oldnumeric as _Numeric
except:
    try:
        import numarray as _Numeric #if numarray is used it is renamed Numeric
    except:
        try:
            import Numeric as _Numeric
        except:
            msg= """
            This module requires the Numeric/numarray or NumPy module,
            which could not be imported. It probably is not installed
            (it's not part of the standard Python distribution). See the
            Numeric Python site (http://numpy.scipy.org) for information on
            downloading source or binaries."""
            raise ImportError, "Numeric,numarray or NumPy not found. \n" + msg

Essentially, it tries three options from newest to oldest. But even
the newest is old enough that it's commonly unavailable (the
oldnumeric module was removed from NumPy in version 1.9).

Code should now be using the numpy interface. Apparently wxPython has
only recently done this:

  http://trac.wxwidgets.org/ticket/16590

Right, thanks for the clear explanation. Just read this post :-/.

Nikos