Ask Your Question
0

Sage-7.6.app on macOS 10.12 Sierra not running

asked 2017-04-22 16:57:04 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Does the native app version of Sage need any changes to the system settings on macOS 10.12.3 to run?

After installing from sage-7.6-OSX_10.12.3-x86_64.app.dmg and launching the app from the launchpad, if first just sits there checking 'Sagemath-7.6' for tens of minutes. Then it complains about permissions (unknown publisher). After giving confirmation that it is OK to run the app, nothing happens anymore. The app get 0.0% CPU cycles.

It's probably something obvious, I haven't been able to figure it out yet.

(BTW: Both an iMac running 10.12.4 and an MBP running 10.12.3 show the same behaviour)

edit retag flag offensive close merge delete

Comments

Hmm, what happens if you launch it directly from the Applications directory? You do need to move it from the dmg (I think you already did that). Also, do you have a fairly old piece of hardware running this with 10.12? In that case you might want to try the 10.11.6 dmg just in case.

kcrisman gravatar imagekcrisman ( 2017-04-22 20:02:54 -0600 )edit

Yes, I did move it from the dmg. When I open a terminal session and run /Applications/Sage-7.6.app/sage, eventually the sage: prompt appears and the browser-based notebook interface can be started by means of the notebook() command. It's ugly, but it works. The iMac is late 2012 and the MBP is early 2015, so not that old I would say...

Tony-64 gravatar imageTony-64 ( 2017-04-23 08:50:40 -0600 )edit

Huh, I would have expected you to say that the terminal didn't work. I'm sorry that we don't have any tools to remotely diagnose this for you. The 2012 one with 10.12 I would expect to have different instruction sets but that shouldn't affect the app part.

kcrisman gravatar imagekcrisman ( 2017-04-24 10:08:12 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-04-24 16:47:07 -0600

Tony-64 gravatar image

It's running on the MBP now. Apparently the F-Secure anti-virus software running on the machine doesn't like Sage and blocks it's execution (even though it doesn't say so in its logs). Removing the previous 10.12.3 installation and reinstalling if from scratch with F-Secure disabled solved the issue. Anyway, the next thing to resolve is how to automatically start the jupyter interface rather than the old notebook, but I guess that's another thread...

BTW, the iMac had the same issue. It starts the app now, but unfortunately doesn't like the 10.12.3 dmg. When starting the app, it opens two terminal windows, one of which shows the error messages copied below. I'll try the 10.11.6 dmg later.

10.12.3 dmg error message on a late 2012 iMac:

iMac-of-Tony:~ tony$ '/Applications/SageMath-7.6.app/Contents/Resources/sage/sage' --notebook=sagenb
Fatal Python error: Py_Initialize: unable to load the file system codec
  File "/Applications/SageMath-7.6.app/Contents/Resources/sage/local/lib/python/encodings/__init__.py", line 123
    raise CodecRegistryError,\
                            ^
SyntaxError: invalid syntax

Current thread 0x00007ffff04043c0 (most recent call first):
/Applications/SageMath-7.6.app/Contents/Resources/sage/sage: line 130: 11912 Abort trap: 6           "$SAGE_ROOT/relocate-once.py"
Traceback (most recent call last):
  File "/Applications/SageMath-7.6.app/Contents/Resources/sage/src/bin/sage-notebook", line 7, in <module>
    import argparse
  File "/Applications/SageMath-7.6.app/Contents/Resources/sage/local/lib/python/argparse.py", line 85, in <module>
    import collections as _collections
  File "/Applications/SageMath-7.6.app/Contents/Resources/sage/local/lib/python/collections.py", line 21, in <module>
    from operator import itemgetter as _itemgetter, eq as _eq
ImportError: dlopen(/Applications/SageMath-7.6.app/Contents/Resources/sage/local/lib/python2.7/lib-dynload/operator.so, 2): Symbol not found: __PyUnicodeUCS4_AsDefaultEncodedString
  Referenced from: /Applications/SageMath-7.6.app/Contents/Resources/sage/local/lib/python2.7/lib-dynload/operator.so
  Expected in: flat namespace
 in /Applications/SageMath-7.6.app/Contents/Resources/sage/local/lib/python2.7/lib-dynload/operator.so
iMac-of-Tony:~ tony$
edit flag offensive delete link more

Comments

Oh yeah, that definitely is different. See e.g. https://ask.sagemath.org/question/853... - probably you have other Pythons?

kcrisman gravatar imagekcrisman ( 2017-04-25 08:23:28 -0600 )edit

And good sleuthing on the anti-virus software; that isn't surprising at all but it doesn't usually occur to me.

kcrisman gravatar imagekcrisman ( 2017-04-25 08:23:57 -0600 )edit

Yes, I am running anaconda as well, both on the MBP and on the iMac. I don't have acces the iMac right now (travelling), but will check it this weekend to see what's different from the MBP. Trying the 10.11.6 dmg may not yield much if the above issue is an adverse interaction with another Python.

The anti-virus thing caught me unawares. I should have thought of that much earlier...

Tony-64 gravatar imageTony-64 ( 2017-04-25 15:48:38 -0600 )edit

Oh, if you have Anaconda then that is definitely the issue with the second error message.

kcrisman gravatar imagekcrisman ( 2017-04-25 21:35:31 -0600 )edit

One step further on the iMac. After disabling the anti-virus software and removing anaconda from the path, the 10.12.3 dmg installs fine. The app runs as expected and fires up the old notebook interface. However, the Jupyter interface won't start. There is not even a sign in the sage.log file that it is trying to start Jupyter (unlike on the MBP). Puzzling...

Tony-64 gravatar imageTony-64 ( 2017-04-29 13:17:12 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2017-04-22 16:57:04 -0600

Seen: 245 times

Last updated: Apr 24