grass-7.9 does not find numpy

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

grass-7.9 does not find numpy

Rich Shepard
Starting grass-7.9 in a new location and mapset fails:

wxnviz.py: 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.
Traceback (most recent call last):
   File "/usr/local/grass79/gui/wxpython/wxgui.py", line 172, in <module>
     sys.exit(main())
   File "/usr/local/grass79/gui/wxpython/wxgui.py", line 159, in main
     app = GMApp(workspaceFile)
   File "/usr/local/grass79/gui/wxpython/wxgui.py", line 53, in __init__
     wx.App.__init__(self, False)
   File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 8628, in __init__
     self._BootstrapApp()
   File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 8196, in _BootstrapApp
     return _core_.PyApp__BootstrapApp(*args, **kwargs)
   File "/usr/local/grass79/gui/wxpython/wxgui.py", line 104, in OnInit
     from lmgr.frame import GMFrame
   File "/usr/local/grass79/gui/wxpython/lmgr/frame.py", line 51, in <module>
     from lmgr.layertree import LayerTree, LMIcons
   File "/usr/local/grass79/gui/wxpython/lmgr/layertree.py", line 40, in <module>
     from wxplot.histogram import HistogramPlotFrame
   File "/usr/local/grass79/gui/wxpython/wxplot/histogram.py", line 23, in <module>
     import gui_core.wxlibplot as plot
   File "/usr/local/grass79/gui/wxpython/gui_core/wxlibplot.py", line 121, in <module>
     import numpy as np
ImportError: No module named numpy

Numpy is installed (by pip) in /usr/lib64/python3.7/site-packages/.

Please advise me how to make this installation visible to wxnviz.

Regards,

Rich

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Vincent Bain
Hello Rich,

perhaps related:

https://lists.osgeo.org/pipermail/grass-user/2019-July/080547.html



Vincent.

Le jeudi 15 août 2019 à 11:12 -0700, Rich Shepard a écrit :

> Starting grass-7.9 in a new location and mapset fails:
>
> wxnviz.py: 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.
> Traceback (most recent call last):
>    File "/usr/local/grass79/gui/wxpython/wxgui.py", line 172, in
> <module>
>      sys.exit(main())
>    File "/usr/local/grass79/gui/wxpython/wxgui.py", line 159, in main
>      app = GMApp(workspaceFile)
>    File "/usr/local/grass79/gui/wxpython/wxgui.py", line 53, in
> __init__
>      wx.App.__init__(self, False)
>    File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
> line 8628, in __init__
>      self._BootstrapApp()
>    File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py",
> line 8196, in _BootstrapApp
>      return _core_.PyApp__BootstrapApp(*args, **kwargs)
>    File "/usr/local/grass79/gui/wxpython/wxgui.py", line 104, in
> OnInit
>      from lmgr.frame import GMFrame
>    File "/usr/local/grass79/gui/wxpython/lmgr/frame.py", line 51, in
> <module>
>      from lmgr.layertree import LayerTree, LMIcons
>    File "/usr/local/grass79/gui/wxpython/lmgr/layertree.py", line 40,
> in <module>
>      from wxplot.histogram import HistogramPlotFrame
>    File "/usr/local/grass79/gui/wxpython/wxplot/histogram.py", line
> 23, in <module>
>      import gui_core.wxlibplot as plot
>    File "/usr/local/grass79/gui/wxpython/gui_core/wxlibplot.py", line
> 121, in <module>
>      import numpy as np
> ImportError: No module named numpy
>
> Numpy is installed (by pip) in /usr/lib64/python3.7/site-packages/.
>
> Please advise me how to make this installation visible to wxnviz.
>
> Regards,
>
> Rich
>
> _______________________________________________
> grass-user mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Markus Metz-3
In reply to this post by Rich Shepard


On Thu, Aug 15, 2019 at 8:12 PM Rich Shepard <[hidden email]> wrote:

>
> Starting grass-7.9 in a new location and mapset fails:
>
> wxnviz.py: 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.
> Traceback (most recent call last):
>    File "/usr/local/grass79/gui/wxpython/wxgui.py", line 172, in <module>
>      sys.exit(main())
>    File "/usr/local/grass79/gui/wxpython/wxgui.py", line 159, in main
>      app = GMApp(workspaceFile)
>    File "/usr/local/grass79/gui/wxpython/wxgui.py", line 53, in __init__
>      wx.App.__init__(self, False)
>    File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 8628, in __init__
>      self._BootstrapApp()
>    File "/usr/lib64/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 8196, in _BootstrapApp
>      return _core_.PyApp__BootstrapApp(*args, **kwargs)
>    File "/usr/local/grass79/gui/wxpython/wxgui.py", line 104, in OnInit
>      from lmgr.frame import GMFrame
>    File "/usr/local/grass79/gui/wxpython/lmgr/frame.py", line 51, in <module>
>      from lmgr.layertree import LayerTree, LMIcons
>    File "/usr/local/grass79/gui/wxpython/lmgr/layertree.py", line 40, in <module>
>      from wxplot.histogram import HistogramPlotFrame
>    File "/usr/local/grass79/gui/wxpython/wxplot/histogram.py", line 23, in <module>
>      import gui_core.wxlibplot as plot
>    File "/usr/local/grass79/gui/wxpython/gui_core/wxlibplot.py", line 121, in <module>
>      import numpy as np
> ImportError: No module named numpy
>
> Numpy is installed (by pip) in /usr/lib64/python3.7/site-packages/.

but the gui is looking in /usr/lib64/python2.7/site-packages/

-> wrong python version

make sure wxpython for python3 is installed, make distclean, configure, make

HTH,

Markus M


_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Rich Shepard
In reply to this post by Vincent Bain
On Thu, 15 Aug 2019, Vincent Bain wrote:

> perhaps related:
> https://lists.osgeo.org/pipermail/grass-user/2019-July/080547.html

Vincent,

Thanks for the URL, but it's not the same issue. There was no numpy to
upgrade.

Normally I build and install packages using the SlackBuilds.org scripts. For
reasons we could not explain, numpy3, scipy3, and python3-matplotlib refused
to build.

Needing these tools I used the command 'pip3 install numpy' because this
syntax tells pip3 to install numpy3 in the python-3.7/site-packages/
directory.

Regards,

Rich
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Rich Shepard
In reply to this post by Markus Metz-3
On Thu, 15 Aug 2019, Markus Metz wrote:

> but the gui is looking in /usr/lib64/python2.7/site-packages/
> -> wrong python version
> make sure wxpython for python3 is installed, make distclean, configure, make

Markus M,

Thank you. I thought wxPython-3.0.2.0 worked for both Python versions.
Regardless, I'll get a wxPython4 package installed.

Best regards,

Rich

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Rich Shepard
In reply to this post by Markus Metz-3
On Thu, 15 Aug 2019, Markus Metz wrote:

> but the gui is looking in /usr/lib64/python2.7/site-packages/
> -> wrong python version
> make sure wxpython for python3 is installed, make distclean, configure, make

Markus M,

Now, wxPython-4.0.4 is installed and visible in
/usr/lib64/python3.7/site-packages/ but a rebuilt/reinstalled grass79 still
cannot find it:

$ grass79
Starting GRASS GIS...
ERROR: wxGUI requires wxPython. No module named wx
You can still use GRASS GIS modules in the command line or in Python.
ERROR: Error in GUI startup. See messages above (if any) and if necessary, please report this error to the GRASS developers.
On systems with package manager, make sure you have the right GUI package, probably named grass-gui, installed.
To run GRASS GIS in text mode use the --text flag.
Use '--help' for further options
      grass79 --help
See also: https://grass.osgeo.org/grass79/manuals/helptext.html
Exiting...

'wx' is found in several places:

# find / -name wx
/usr/include/wx-3.0/wx
/usr/include/wx-2.8/wx
/usr/lib64/python3.7/site-packages/wx
/usr/lib64/wx
/usr/lib64/wx/include/gtk2-unicode-release-2.8/wx
/usr/lib64/wx/include/gtk2-unicode-3.0/wx
/home/rshepard/.grass7/wx

Could grass be looking for wxPython rather than wxPython4?

Regards,

Rich
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Markus Metz-3


On Thu, Aug 15, 2019 at 10:50 PM Rich Shepard <[hidden email]> wrote:

>
> On Thu, 15 Aug 2019, Markus Metz wrote:
>
> > but the gui is looking in /usr/lib64/python2.7/site-packages/
> > -> wrong python version
> > make sure wxpython for python3 is installed, make distclean, configure, make
>
> Markus M,
>
> Now, wxPython-4.0.4 is installed and visible in
> /usr/lib64/python3.7/site-packages/ but a rebuilt/reinstalled grass79 still
> cannot find it:

the grass startup script was not updated to enforce python3, fixed in master 83ba584e

git pull && make
should help

Markus M

>
> $ grass79

> Starting GRASS GIS...
> ERROR: wxGUI requires wxPython. No module named wx
> You can still use GRASS GIS modules in the command line or in Python.
> ERROR: Error in GUI startup. See messages above (if any) and if necessary, please report this error to the GRASS developers.
> On systems with package manager, make sure you have the right GUI package, probably named grass-gui, installed.
> To run GRASS GIS in text mode use the --text flag.
> Use '--help' for further options
>       grass79 --help
> See also: https://grass.osgeo.org/grass79/manuals/helptext.html
> Exiting...
>
> 'wx' is found in several places:
>
> # find / -name wx
> /usr/include/wx-3.0/wx
> /usr/include/wx-2.8/wx
> /usr/lib64/python3.7/site-packages/wx
> /usr/lib64/wx
> /usr/lib64/wx/include/gtk2-unicode-release-2.8/wx
> /usr/lib64/wx/include/gtk2-unicode-3.0/wx
> /home/rshepard/.grass7/wx
>
> Could grass be looking for wxPython rather than wxPython4?
>
> Regards,
>
> Rich
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Rich Shepard
On Thu, 15 Aug 2019, Markus Metz wrote:

> the grass startup script was not updated to enforce python3, fixed in
> master 83ba584e
>
> git pull && make
> should help

Markus M,

I pulled new changed files from the git repo, saw a file name 'master...'.
Configured, built, and installed. Same error: grass is not finding wx.

Here, wx is seen in several places. Should there be more than one location
for this library? If so, where?

Thanks,

Rich
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Rich Shepard
On Thu, 15 Aug 2019, Rich Shepard wrote:

> I pulled new changed files from the git repo, saw a file name 'master...'.
> Configured, built, and installed. Same error: grass is not finding wx.

/usr/local/grass79/etc/VERSIONNUMBER is 7.9.dev 86354090c.

Rich
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Rich Shepard
On Thu, 15 Aug 2019, Rich Shepard wrote:

> /usr/local/grass79/etc/VERSIONNUMBER is 7.9.dev 86354090c.

I just ran 'git pull' and configured, made, and installed the results. The
version number is the same as above and the initiation still exits because
it cannot find the GUI. wxPython-4.0.4 is installed.

What might I still be missing? I need to resolve this as soon as possible
and appeciate tests I can run to isolate the source of the problem.

Regards,

Rich
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Markus Metz-3


On Mon, Aug 19, 2019 at 6:51 PM Rich Shepard <[hidden email]> wrote:

>
> On Thu, 15 Aug 2019, Rich Shepard wrote:
>
> > /usr/local/grass79/etc/VERSIONNUMBER is 7.9.dev 86354090c.
>
> I just ran 'git pull' and configured, made, and installed the results. The
> version number is the same as above and the initiation still exits because
> it cannot find the GUI. wxPython-4.0.4 is installed.
>
> What might I still be missing? I need to resolve this as soon as possible
> and appeciate tests I can run to isolate the source of the problem.

Please post the full error message.

Markus M


_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Rich Shepard
On Mon, 19 Aug 2019, Markus Metz wrote:

> Please post the full error message.

Markus M,

Starting GRASS GIS...
ERROR: wxGUI requires wxPython. No module named wx
You can still use GRASS GIS modules in the command line or in Python.
ERROR: Error in GUI startup. See messages above (if any) and if necessary, please report this error to the GRASS developers.
On systems with package manager, make sure you have the right GUI package, probably named grass-gui, installed.
To run GRASS GIS in text mode use the --text flag.
Use '--help' for further options
      grass79 --help
See also: https://grass.osgeo.org/grass79/manuals/helptext.html

Also, when I send the 'git pull' command instead of seeing a list of
upgraded files I see this:

remote: Compressing objects: 100% (12/12), done.
remote: Total 24 (delta 14), reused 14 (delta 11), pack-reused 1
Unpacking objects: 100% (24/24), done.
From https://github.com/OSGeo/grass
    f6edaaffa..494d10b10  master            -> origin/master
    0afea5a41..329fab952  releasebranch_7_6 -> origin/releasebranch_7_6
    d95f60bac..f582300b8  releasebranch_7_8 -> origin/releasebranch_7_8
Updating 86354090c..494d10b10
error: Your local changes to the following files would be overwritten by merge:
  lib/python/ctypes/ctypesgencore/parser/lextab.py
Please commit  your changes or stash them before you merge.
Aborting

$ less /usr/local/grass79/etc/VERSIONNUMBER remains at 86354090c.

I'll run grass strictly from the command line now (as I did with versions
4.x) but it would be nice to have grass find wxPython-4.0.4 when starting.

HTH,

Rich
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Markus Neteler
On Thu, Aug 22, 2019 at 5:57 PM Rich Shepard <[hidden email]> wrote:

>
> On Mon, 19 Aug 2019, Markus Metz wrote:
>
> > Please post the full error message.
>
> Markus M,
>
> Starting GRASS GIS...
> ERROR: wxGUI requires wxPython. No module named wx
> You can still use GRASS GIS modules in the command line or in Python.
> ERROR: Error in GUI startup. See messages above (if any) and if necessary, please report this error to the GRASS developers.
> On systems with package manager, make sure you have the right GUI package, probably named grass-gui, installed.
> To run GRASS GIS in text mode use the --text flag.
> Use '--help' for further options
>       grass79 --help
> See also: https://grass.osgeo.org/grass79/manuals/helptext.html
>
> Also, when I send the 'git pull' command instead of seeing a list of
> upgraded files I see this:
>
> remote: Compressing objects: 100% (12/12), done.
> remote: Total 24 (delta 14), reused 14 (delta 11), pack-reused 1
> Unpacking objects: 100% (24/24), done.
> From https://github.com/OSGeo/grass
>     f6edaaffa..494d10b10  master            -> origin/master
>     0afea5a41..329fab952  releasebranch_7_6 -> origin/releasebranch_7_6
>     d95f60bac..f582300b8  releasebranch_7_8 -> origin/releasebranch_7_8
> Updating 86354090c..494d10b10
> error: Your local changes to the following files would be overwritten by merge:
>         lib/python/ctypes/ctypesgencore/parser/lextab.py

run

git checkout lib/python/ctypes/ctypesgencore/parser/lextab.py

then update again. That glitch has been fixed recently but requires
this step (one time).

markusN
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: grass-7.9 does not find numpy

Rich Shepard
On Sun, 1 Sep 2019, Markus Neteler wrote:

> run
> git checkout lib/python/ctypes/ctypesgencore/parser/lextab.py
> then update again. That glitch has been fixed recently but requires
> this step (one time).

markusN,

I pulled from the git repo yesterday morning, added them to my repo clone,
then configured, built, and installed grass7.9.svn. Testing using 'grass79
--gui' brought up that interface. So yesterday's pull must have included
lextab.py.

Thanks again,

Rich
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user