Re: [sage-support] tkinter on Leap 15.1

2020-01-08 Thread slelievre


Le mardi 7 janvier 2020 10:15:08 UTC+1, dim...@gmail.com a écrit :
>
> On Mon, Jan 06, 2020 at 05:54:02PM -0800, 'Ricksme' via sage-support 
> wrote: 
> > I am about to build sage 9.0 on opensuse Leap 15.1 and notice that 
> import 
> > Tkinter works in python 2.7.14 but that import tkinter is required for 
> > python 3.6.9 (Leap 15.1 installation). The sage 9.0 installation guide 
> > specifies the (uppercase T) Tkinter which applies to python 2 in my 
> > installation but sage 9.0 is built with python 3. Is this going to be an 
> > issue and does someone know about this? 
>
> That Tkinter -> tkinter change at py2 -> py3 could have been something 
> we overlooked, as probably noone involved in Sage releases has any idea 
> about tkinter. 
>

We should indeed adapt that section of the "install from source" page at

https://doc.sagemath.org/html/en/installation/source.html

I guess that to check support for Tk interface it's enough to try

import _tkinter

In Python 2, import Tkinter will import _tkinter.
In Python 3, import tkinter will import _tkinter.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/381ea0fa-eb98-4cd5-8d30-d533a91c2f60%40googlegroups.com.


[sage-support] Sage Crash report

2020-01-08 Thread Malcolm MacCallum
This is from Ubuntu 18.04 Linux 64-bit
Sage built from source. The build had an error as follows
=
The following package(s) may have failed to build (not necessarily
during this run of 'make all-start'):

* package: r-3.6.2
  log file: /usr/local/CA/sage-9.0/logs/pkgs/r-3.6.2.log
  build directory: /usr/local/CA/sage-9.0/local/var/tmp/sage/build/r-3.6.2

The build directory may contain configuration files and other potentially
helpful information. WARNING: if you now run 'make' again, the build
directory will, by default, be deleted. Set the environment variable
SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.

Makefile:31: recipe for target 'all-start' failed
make[1]: *** [all-start] Error 1
make[1]: Leaving directory '/usr/local/CA/sage-9.0'
Makefile:13: recipe for target 'all' failed

I then tried to run sage, getting the following error log.

***

IPython post-mortem report

{'commit_hash': u'033ab93c7',
 'commit_source': 'installation',
 'default_encoding': 'UTF-8',
 'ipython_path': 
'/usr/local/CA/sage-8.8/local/lib/python2.7/site-packages/IPython',
 'ipython_version': '5.8.0',
 'os_name': 'posix',
 'platform': 'Linux-5.0.0-37-generic-x86_64-with-debian-buster-sid',
 'sys_executable': '/usr/local/CA/sage-8.8/local/bin/python2',
 'sys_platform': 'linux2',
 'sys_version': '2.7.15 (default, Sep  4 2019, 11:48:34) \n[GCC 4.8.5 20150623 
(Red Hat 4.8.5-39)]'}

***



***

Crash traceback:

---
---
ImportError Python 2.7.15: /usr/local/CA/sage-8.8/local/bin/python2
   Wed Jan  8 16:34:13 2020
A problem occurred executing Python code.  Here is the sequence of function
calls leading up to the error, with the most recent (innermost) call last.
/usr/local/CA/sage-8.8/src/bin/sage-ipython in ()
  1 #!/usr/bin/env sage-python23
  2 # -*- coding: utf-8 -*-
  3 """
  4 Sage IPython startup script.
  5 """
  6 
  7 # Display startup banner. Do this before anything else to give the user
  8 # early feedback that Sage is starting.
  9 from sage.misc.banner import banner
 10 banner()
 11 
 12 from sage.repl.interpreter import SageTerminalApp
 13 
 14 app = SageTerminalApp.instance()
---> 15 app.initialize()
global app.initialize = >
 16 app.start()

 in initialize(self=, argv=None)

/usr/local/CA/sage-8.8/local/lib/python2.7/site-packages/traitlets/config/application.pyc
 in catch_config_error(method=, 
app=, *args=(None,), **kwargs={})
 72 TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR = False
 73 else:
 74 raise ValueError("Unsupported value for environment variable: 
'TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR' is set to '%s' which is none of 
 {'0', '1', 'false', 'true', ''}."% _envvar )
 75 
 76 
 77 @decorator
 78 def catch_config_error(method, app, *args, **kwargs):
 79 """Method decorator for catching invalid config 
(Trait/ArgumentErrors) during init.
 80 
 81 On a TraitError (generally caused by bad config), this will print 
the trait's
 82 message, and exit the app.
 83 
 84 For use on init methods, to prevent invoking excepthook on invalid 
input.
 85 """
 86 try:
---> 87 return method(app, *args, **kwargs)
method = 
app = 
args = (None,)
kwargs = {}
 88 except (TraitError, ArgumentError) as e:
 89 app.print_help()
 90 app.log.fatal("Bad config encountered during initialization:")
 91 app.log.fatal(str(e))
 92 app.log.debug("Config at the time: %s", app.config)
 93 app.exit(1)
 94 
 95 
 96 class ApplicationError(Exception):
 97 pass
 98 
 99 
100 class LevelFormatter(logging.Formatter):
101 """Formatter with additional `highlevel` record
102 

/usr/local/CA/sage-8.8/local/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc
 in initialize(self=, argv=None)
301 
302 return super(TerminalIPythonApp, self).parse_command_line(argv)
303 
304 @catch_config_error
305 def initialize(self, argv=None):
306 """Do actions after construct, but before starting the app."""
307 super(TerminalIPythonApp, self).initialize(argv)
308 if self.subapp is not None:
309 # don't bother initializing further, starting subapp
310 return
311 # print self.extra_args
312 if self.extra_args and not self.something_to_run:
313 self.file_to_run = self.extra_args[

Re: [sage-support] Sage Crash report

2020-01-08 Thread Dima Pasechnik
at the end of your log:

ImportError: libgfortran.so.3: cannot open shared object file: No such
file or directory

Are you using system's gfortran? (you should)


On Wed, Jan 8, 2020 at 4:42 PM Malcolm MacCallum
 wrote:
>
> This is from Ubuntu 18.04 Linux 64-bit
> Sage built from source. The build had an error as follows
> =
> The following package(s) may have failed to build (not necessarily
> during this run of 'make all-start'):
>
> * package: r-3.6.2
>   log file: /usr/local/CA/sage-9.0/logs/pkgs/r-3.6.2.log
>   build directory: /usr/local/CA/sage-9.0/local/var/tmp/sage/build/r-3.6.2
>
> The build directory may contain configuration files and other potentially
> helpful information. WARNING: if you now run 'make' again, the build
> directory will, by default, be deleted. Set the environment variable
> SAGE_KEEP_BUILT_SPKGS to 'yes' to prevent this.
>
> Makefile:31: recipe for target 'all-start' failed
> make[1]: *** [all-start] Error 1
> make[1]: Leaving directory '/usr/local/CA/sage-9.0'
> Makefile:13: recipe for target 'all' failed
>
> I then tried to run sage, getting the following error log.
>
> ***
>
> IPython post-mortem report
>
> {'commit_hash': u'033ab93c7',
>  'commit_source': 'installation',
>  'default_encoding': 'UTF-8',
>  'ipython_path': 
> '/usr/local/CA/sage-8.8/local/lib/python2.7/site-packages/IPython',
>  'ipython_version': '5.8.0',
>  'os_name': 'posix',
>  'platform': 'Linux-5.0.0-37-generic-x86_64-with-debian-buster-sid',
>  'sys_executable': '/usr/local/CA/sage-8.8/local/bin/python2',
>  'sys_platform': 'linux2',
>  'sys_version': '2.7.15 (default, Sep  4 2019, 11:48:34) \n[GCC 4.8.5 
> 20150623 (Red Hat 4.8.5-39)]'}
>
> ***
>
>
>
> ***
>
> Crash traceback:
>
> ---
> ---
> ImportError Python 2.7.15: /usr/local/CA/sage-8.8/local/bin/python2
>Wed Jan  8 16:34:13 2020
> A problem occurred executing Python code.  Here is the sequence of function
> calls leading up to the error, with the most recent (innermost) call last.
> /usr/local/CA/sage-8.8/src/bin/sage-ipython in ()
>   1 #!/usr/bin/env sage-python23
>   2 # -*- coding: utf-8 -*-
>   3 """
>   4 Sage IPython startup script.
>   5 """
>   6
>   7 # Display startup banner. Do this before anything else to give the 
> user
>   8 # early feedback that Sage is starting.
>   9 from sage.misc.banner import banner
>  10 banner()
>  11
>  12 from sage.repl.interpreter import SageTerminalApp
>  13
>  14 app = SageTerminalApp.instance()
> ---> 15 app.initialize()
> global app.initialize =  >
>  16 app.start()
>
>  in initialize(self= object>, argv=None)
>
> /usr/local/CA/sage-8.8/local/lib/python2.7/site-packages/traitlets/config/application.pyc
>  in catch_config_error(method=, 
> app=, *args=(None,), 
> **kwargs={})
>  72 TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR = False
>  73 else:
>  74 raise ValueError("Unsupported value for environment variable: 
> 'TRAITLETS_APPLICATION_RAISE_CONFIG_FILE_ERROR' is set to '%s' which is none 
> of  {'0', '1', 'false', 'true', ''}."% _envvar )
>  75
>  76
>  77 @decorator
>  78 def catch_config_error(method, app, *args, **kwargs):
>  79 """Method decorator for catching invalid config 
> (Trait/ArgumentErrors) during init.
>  80
>  81 On a TraitError (generally caused by bad config), this will print 
> the trait's
>  82 message, and exit the app.
>  83
>  84 For use on init methods, to prevent invoking excepthook on 
> invalid input.
>  85 """
>  86 try:
> ---> 87 return method(app, *args, **kwargs)
> method = 
> app = 
> args = (None,)
> kwargs = {}
>  88 except (TraitError, ArgumentError) as e:
>  89 app.print_help()
>  90 app.log.fatal("Bad config encountered during initialization:")
>  91 app.log.fatal(str(e))
>  92 app.log.debug("Config at the time: %s", app.config)
>  93 app.exit(1)
>  94
>  95
>  96 class ApplicationError(Exception):
>  97 pass
>  98
>  99
> 100 class LevelFormatter(logging.Formatter):
> 101 """Formatter with additional `highlevel` record
> 102
>
> /usr/local/CA/sage-8.8/local/lib/python2.7/site-packages/IPython/terminal/ipapp.pyc
>  in initialize(self=, argv=None)
> 301
> 302 return super(TerminalIPythonApp, 
> self).parse_command_line(argv)
> 303
> 304 @catch_config_error
> 305 def initialize(self, argv=

Re: [sage-support] tkinter on Leap 15.1

2020-01-08 Thread 'Ricksme' via sage-support


On Wednesday, 8 January 2020 13:47:17 UTC, slelievre wrote:
>
>
>
> Le mardi 7 janvier 2020 10:15:08 UTC+1, dim...@gmail.com a écrit :
>>
>> On Mon, Jan 06, 2020 at 05:54:02PM -0800, 'Ricksme' via sage-support 
>> wrote: 
>> > I am about to build sage 9.0 on opensuse Leap 15.1 and notice that 
>> import 
>> > Tkinter works in python 2.7.14 but that import tkinter is required for 
>> > python 3.6.9 (Leap 15.1 installation). The sage 9.0 installation guide 
>> > specifies the (uppercase T) Tkinter which applies to python 2 in my 
>> > installation but sage 9.0 is built with python 3. Is this going to be 
>> an 
>> > issue and does someone know about this? 
>>
>> That Tkinter -> tkinter change at py2 -> py3 could have been something 
>> we overlooked, as probably noone involved in Sage releases has any idea 
>> about tkinter. 
>>
>
> We should indeed adapt that section of the "install from source" page at
>
> https://doc.sagemath.org/html/en/installation/source.html
>
> I guess that to check support for Tk interface it's enough to try
>
> import _tkinter
>
> In Python 2, import Tkinter will import _tkinter.
> In Python 3, import tkinter will import _tkinter.
>

import _tkinter works for both 2 and 3.
import Tkinter for python 2  OR import tkinter for python 3

I haven't checked whether there is code within the sage-9.0 installation 
that uses this import statement. If there is, presumably the correct 
version of import tkinter is employed.

Rick

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5f1d7887-f97f-4611-8c50-bccc8ab79b94%40googlegroups.com.


Re: [sage-support] tkinter on Leap 15.1

2020-01-08 Thread 'Ricksme' via sage-support


On Wednesday, 8 January 2020 13:47:17 UTC, slelievre wrote:
>
>
>
> Le mardi 7 janvier 2020 10:15:08 UTC+1, dim...@gmail.com a écrit :
>>
>> On Mon, Jan 06, 2020 at 05:54:02PM -0800, 'Ricksme' via sage-support 
>> wrote: 
>> > I am about to build sage 9.0 on opensuse Leap 15.1 and notice that 
>> import 
>> > Tkinter works in python 2.7.14 but that import tkinter is required for 
>> > python 3.6.9 (Leap 15.1 installation). The sage 9.0 installation guide 
>> > specifies the (uppercase T) Tkinter which applies to python 2 in my 
>> > installation but sage 9.0 is built with python 3. Is this going to be 
>> an 
>> > issue and does someone know about this? 
>>
>> That Tkinter -> tkinter change at py2 -> py3 could have been something 
>> we overlooked, as probably noone involved in Sage releases has any idea 
>> about tkinter. 
>>
>
> We should indeed adapt that section of the "install from source" page at
>
> https://doc.sagemath.org/html/en/installation/source.html
>
> I guess that to check support for Tk interface it's enough to try
>
> import _tkinter
>
> In Python 2, import Tkinter will import _tkinter.
> In Python 3, import tkinter will import _tkinter.
>
> I think the one line is adequate to check for support; problem solved.

Is testing the installation  out of context for the installation document?
Testing could be done by importing the second line and running:
tkinter._test()

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/aba13fb8-62f8-4ce5-8f34-0e30fc7a4162%40googlegroups.com.


Re: [sage-support] tkinter on Leap 15.1

2020-01-08 Thread 'Ricksme' via sage-support


On Wednesday, 8 January 2020 13:47:17 UTC, slelievre wrote:
>
>
>
> Le mardi 7 janvier 2020 10:15:08 UTC+1, dim...@gmail.com a écrit :
>>
>> On Mon, Jan 06, 2020 at 05:54:02PM -0800, 'Ricksme' via sage-support 
>> wrote: 
>> > I am about to build sage 9.0 on opensuse Leap 15.1 and notice that 
>> import 
>> > Tkinter works in python 2.7.14 but that import tkinter is required for 
>> > python 3.6.9 (Leap 15.1 installation). The sage 9.0 installation guide 
>> > specifies the (uppercase T) Tkinter which applies to python 2 in my 
>> > installation but sage 9.0 is built with python 3. Is this going to be 
>> an 
>> > issue and does someone know about this? 
>>
>> That Tkinter -> tkinter change at py2 -> py3 could have been something 
>> we overlooked, as probably noone involved in Sage releases has any idea 
>> about tkinter. 
>>
>
> We should indeed adapt that section of the "install from source" page at
>
> https://doc.sagemath.org/html/en/installation/source.html
>
> I guess that to check support for Tk interface it's enough to try
>
> import _tkinter
>
> In Python 2, import Tkinter will import _tkinter.
> In Python 3, import tkinter will import _tkinter.
>
> I think the one line is adequate to check for support; problem solved.

Is testing the installation  out of context for the installation document?
If testing is required, both import lines could be followed by a test

import _tkinter
import tkinter
tkinter._test()

 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/ec62f2d9-f676-4ec9-a624-01b4c5990366%40googlegroups.com.