[GRASS-user] Specifying wxPython version at grass start

   I have two versions of wxPython installed: 2.8.12.1 (for python2) and
3.0.2.0 (for python3). When I try to invoke grass72 I get this error:

Starting GRASS GIS...
ERROR: wxGUI requires wxPython >= 2.8.10.1. invalid literal for int() with
base 10: 'wx'.
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
      grass72 --help
See also: https://grass.osgeo.org/grass72/manuals/helptext.html
Exiting...

   Is there a command line option to specify wxPython-2.8.12.1 when invoking
grass72? I don't see one here:
<https://grass.osgeo.org/grass72/manuals/grass7.html&gt;\.

   Suggestions on a startup command welcome.

TIA,

Rich

On Wed, Aug 31, 2016 at 3:53 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

  I have two versions of wxPython installed: 2.8.12.1 (for python2) and
3.0.2.0 (for python3). When I try to invoke grass72 I get this error:

Starting GRASS GIS...
ERROR: wxGUI requires wxPython >= 2.8.10.1. invalid literal for int() with
base 10: 'wx'.
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
     grass72 --help
See also: https://grass.osgeo.org/grass72/manuals/helptext.html
Exiting...

  Is there a command line option to specify wxPython-2.8.12.1 when invoking
grass72? I don't see one here:
<https://grass.osgeo.org/grass72/manuals/grass7.html&gt;\.

  Suggestions on a startup command welcome.

I don't have experience with this that much, but I would start here:
https://wiki.wxpython.org/MultiVersionInstalls

TIA,

Rich
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Wed, 31 Aug 2016, Anna Petrášová wrote:

I don't have experience with this that much, but I would start here:
https://wiki.wxpython.org/MultiVersionInstalls

   Thanks very much, Anna. I didn't see that on the Wiki.

Regards,

Rich

On 31/08/16 21:53, Rich Shepard wrote:

   I have two versions of wxPython installed: 2.8.12.1 (for python2) and
3.0.2.0 (for python3). When I try to invoke grass72 I get this error:

Starting GRASS GIS...
ERROR: wxGUI requires wxPython >= 2.8.10.1. invalid literal for int() with
base 10: 'wx'.
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
      grass72 --help
See also: https://grass.osgeo.org/grass72/manuals/helptext.html
Exiting...

   Is there a command line option to specify wxPython-2.8.12.1 when invoking
grass72? I don't see one here:
<https://grass.osgeo.org/grass72/manuals/grass7.html&gt;\.

I run GRASS here with wx 3.0.2 and it works fine. The error message seems to imply that there is another wxpython installed on your system that is < 2.8.10. Is that so ? You might want to check that first, before trying to find unnecessary workarounds.

Moritz

On Thu, Sep 1, 2016 at 4:22 AM, Moritz Lennert
<mlennert@club.worldonline.be> wrote:

On 31/08/16 21:53, Rich Shepard wrote:

   I have two versions of wxPython installed: 2.8.12.1 (for python2) and
3.0.2.0 (for python3). When I try to invoke grass72 I get this error:

Starting GRASS GIS...
ERROR: wxGUI requires wxPython >= 2.8.10.1. invalid literal for int() with
base 10: 'wx'.
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
      grass72 --help
See also: https://grass.osgeo.org/grass72/manuals/helptext.html
Exiting...

   Is there a command line option to specify wxPython-2.8.12.1 when
invoking
grass72? I don't see one here:
<https://grass.osgeo.org/grass72/manuals/grass7.html&gt;\.

I run GRASS here with wx 3.0.2 and it works fine. The error message seems to
imply that there is another wxpython installed on your system that is <
2.8.10. Is that so ? You might want to check that first, before trying to
find unnecessary workarounds.

Moritz

there is en error: invalid literal for int() with base 10: 'wx'.

What does this output?

import wx
print wx.__version__

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Thu, 1 Sep 2016, Anna Petrášová wrote:

there is en error: invalid literal for int() with base 10: 'wx'.

What does this output?

import wx
print wx.__version__

[rshepard@salmo ~]$ python
Python 2.7.5 (default, May 29 2013, 03:26:28) [GCC 4.8.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import wx
print wx.__version__

2.8.12.1

   So, python-2.7.5's seeing the correct wx version. Python3 finds no wx
module to import. Looking again at the wxPython.org web site I see that the
3.0.x "classic" series appears to fix OSX issues, not linux. So, I just
removed the 3.0.2.0 package.

   Still see the same startup error:

grass72 Starting GRASS GIS...
ERROR: wxGUI requires wxPython >= 2.8.10.1. invalid literal for int() with
base 10: 'wx'.
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
      grass72 --help
See also: https://grass.osgeo.org/grass72/manuals/helptext.html
Exiting...

   Is this an error in the grass72 source?

Rich

On Thu, 1 Sep 2016, Anna Petrášová wrote:

there is en error: invalid literal for int() with base 10: 'wx'.

What does this output?

import wx
print wx.__version__

Anna, et al.:

   Only wxPython-2.8.12.1 is installed.

   I built, installed, and tested all 7.x flavors:

   - 7.0_release loads just fine.
   - 7.2_release does not recognize wxPython > 2.8.10 is installed.
   - 7.3_trunk does not recognize wxPython > 2.8.10 is installed.

This suggests to me that the issue is not the wxPython version itself, but
something in the wx GUI code that changed from 7.0 to the newer 7.2 release
and 7.3 development version. If the problem is local--and that's always a
reasonable possibility--how can I test to learn why 7.0 will load but not
newer versions?

Rich

On Sat, Sep 3, 2016 at 12:29 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Thu, 1 Sep 2016, Anna Petrášová wrote:

there is en error: invalid literal for int() with base 10: 'wx'.

What does this output?

import wx
print wx.__version__

Anna, et al.:

  Only wxPython-2.8.12.1 is installed.

  I built, installed, and tested all 7.x flavors:

        - 7.0_release loads just fine.
        - 7.2_release does not recognize wxPython > 2.8.10 is installed.
        - 7.3_trunk does not recognize wxPython > 2.8.10 is installed.

This suggests to me that the issue is not the wxPython version itself, but
something in the wx GUI code that changed from 7.0 to the newer 7.2 release
and 7.3 development version. If the problem is local--and that's always a
reasonable possibility--how can I test to learn why 7.0 will load but not
newer versions?

The error comes from gui/wxpythoncore/globalvar. I don't think there
were any significant changes. If you are able to edit and recompile,
try to find out where the error (invalid literal for int) comes from,
I suggest to start here:
https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/core/globalvar.py#L78

Also check if you have GRASS_WXVERSION defined, you don't need to
define when you run the default version.

Rich

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Sat, 3 Sep 2016, Anna Petrášová wrote:

The error comes from gui/wxpythoncore/globalvar. I don't think there
were any significant changes. If you are able to edit and recompile,
try to find out where the error (invalid literal for int) comes from,
I suggest to start here:
https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/core/globalvar.py#L78

   I added a couple of print statements; 7.2 is compiling now.

Also check if you have GRASS_WXVERSION defined, you don't need to
define when you run the default version.

   No GRASS_WXVERSION defined.

Rich

On Sat, 3 Sep 2016, Rich Shepard wrote:

I added a couple of print statements; 7.2 is compiling now.

   But these did not display after building.

Also check if you have GRASS_WXVERSION defined, you don't need to
define when you run the default version.

No GRASS_WXVERSION defined.

   Oops! There is GRASS_WXVERSION exported in ~/.bash_profile, but it's a
much earlier version. Exporting the correct version on the command line
allows both 7.2 and 7.3 to load.

   So, why is the source code not picking up the correct version but does
correctly use the environment variable? An answer now is not necessary, but
I'd be curious to learn the answer at some point.

Much appreciated, Anna,

Rich

On Sat, Sep 3, 2016 at 2:04 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Sat, 3 Sep 2016, Rich Shepard wrote:

I added a couple of print statements; 7.2 is compiling now.

  But these did not display after building.

Also check if you have GRASS_WXVERSION defined, you don't need to
define when you run the default version.

No GRASS_WXVERSION defined.

  Oops! There is GRASS_WXVERSION exported in ~/.bash_profile, but it's a
much earlier version. Exporting the correct version on the command line
allows both 7.2 and 7.3 to load.

  So, why is the source code not picking up the correct version but does
correctly use the environment variable? An answer now is not necessary, but
I'd be curious to learn the answer at some point.

if the variable is defined, it doesn't look for any other versions
than the one specified in the variable. Glad you could resolve this.

Much appreciated, Anna,

Rich

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

On Sat, 3 Sep 2016, Anna Petrášová wrote:

if the variable is defined, it doesn't look for any other versions
than the one specified in the variable. Glad you could resolve this.

   This, of course, makes sense. Yet why the method is not picking up the
correct version without the variable might be worth examining. If I can
assist on this as a tester I will.

Rich

On Sat, Sep 3, 2016 at 3:40 PM, Rich Shepard <rshepard@appl-ecosys.com> wrote:

On Sat, 3 Sep 2016, Anna Petrášová wrote:

if the variable is defined, it doesn't look for any other versions
than the one specified in the variable. Glad you could resolve this.

  This, of course, makes sense. Yet why the method is not picking up the
correct version without the variable might be worth examining. If I can
assist on this as a tester I will.

That's certainly weird. But I don't have better idea than to put the
print messages there.

Rich
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user