Ask Your Question

sage 8.5 windows jupyter can't work

asked 2019-01-15 04:49:27 -0500

linuxCipher gravatar image

updated 2019-03-02 00:46:23 -0500

FrédéricC gravatar image

i use a windows laptop with Chinese. i download the windows installer, and install the sage 8.5 successfully. it can run sage(shell) correctly, but when i launch the jupyter, something wrong with it.

"sage -n" use the cmd to start a server, i got

File "/opt/sagemath-8.5/src/bin/sage-notebook", line 268, in 
File "/opt/sagemath-8.5/src/bin/sage-notebook", line 142, in init
super(SageNBExport, self).init(argv)
File "/opt/sagemath-8.5/src/bin/sage-notebook", line 100, in init
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/jupyter_core/", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/", line 657, in launch_instance
File "", line 2, in initialize
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/", line 89, in catch_config_error
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/", line 385, in print_help
File "/opt/sagemath-8.5/local/lib/python2.7/site-packages/traitlets/config/", line 377, in print_subcommands
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 4: ordinal not in range(128)

so i try some solutions, i can skip this step, but i got stuck in the jupyter launch step:

Could not decode '\xe6\x9c\xaa\xe5\x91\xbd\xe5\x90\x8d' for unicode trait 'untitled_notebook' of a LargeFileManager instance.

i know there is something wrong with the coding in python (and there are many problems when software operate with Chinese), but i can't find the right way to solve it

edit retag flag offensive close merge delete



Does it work when launch the notebook by clicking to the "jupyter noebook" icon, not typing sage -n from the shell ?

tmonteil gravatar imagetmonteil ( 2019-01-15 08:28:25 -0500 )edit

What can not be decoded is 未命名

FrédéricC gravatar imageFrédéricC ( 2019-01-15 09:59:43 -0500 )edit

Nevermind, it seems Juypter's internationalization efforts will just do this automatically

Iguananaut gravatar imageIguananaut ( 2019-01-15 10:48:02 -0500 )edit

This was also reported as though the response was less than helpful.

Iguananaut gravatar imageIguananaut ( 2019-01-15 10:53:20 -0500 )edit

no, it doesn't work with the "jupyter noebook" icon, if i click the icon, the shell open and then the shell closes quickly.

linuxCipher gravatar imagelinuxCipher ( 2019-01-15 20:17:37 -0500 )edit

2 answers

Sort by » oldest newest most voted

answered 2019-03-01 21:07:29 -0500

linuxCipher gravatar image

use the cmd "LANGUAGE=en_US sage -n" can solve the bug

edit flag offensive delete link more

answered 2019-01-15 11:04:04 -0500

Iguananaut gravatar image

I was able to reproduce this simply by running $ LANGUAGE=zn_CN jupyter notebook. Pretty bad. Try running $ LANGUAGE=en_US jupyter notebook or, if LANGUAGE doesn't work you can try one of LC_ALL, LC_MESSAGES, LANG, etc. as described at

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2019-01-15 04:49:27 -0500

Seen: 194 times

Last updated: Mar 01