启动jupyter

问题现象

(base) [xxx@ip-10-169-49-131 sztoc_audiencemanager]$ jupyter notebook --no-browser --port=1234
The Jupyter HTML Notebook.

这将启动一个基于tornado的HTML笔记本服务器,它提供一个html5/
javascript笔记本客户端。

Traceback (most recent call last):
  File "/usr/share/miniconda2/envs/py27/bin/jupyter-notebook", line 11, in <module>
    sys.exit(main())
  File "/opt/miniconda2/envs/py27/lib/python2.7/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/opt/miniconda2/envs/py27/lib/python2.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
  File "</opt/miniconda2/envs/py27/lib/python2.7/site-packages/decorator.pyc:decorator-gen-7>", line 2, in initialize
  File "/opt/miniconda2/envs/py27/lib/python2.7/site-packages/traitlets/config/application.py", line 89, in catch_config_error
    app.print_help()
  File "/opt/miniconda2/envs/py27/lib/python2.7/site-packages/traitlets/config/application.py", line 385, in print_help
    self.print_subcommands()
  File "/opt/miniconda2/envs/py27/lib/python2.7/site-packages/traitlets/config/application.py", line 377, in print_subcommands
    print(os.linesep.join(lines))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 4: ordinal not in range(128)

解决方法

先设置环境变量:export LANG=zn

(base) [xxx@ip-10-169-49-131 sztoc_audiencemanager]$ export LANG=zn

(base) [xxx@ip-10-169-49-131 sztoc_audiencemanager]$ jupyter notebook --no-browser --port=1234
[I 10:09:04.308 NotebookApp] Writing notebook server cookie secret to /run/user/16382/jupyter/notebook_cookie_secret
[I 10:09:05.397 NotebookApp] Serving notebooks from local directory: /ldap_home/sztoc_audiencemanager
[I 10:09:05.397 NotebookApp] The Jupyter Notebook is running at:
[I 10:09:05.397 NotebookApp] http://localhost:1234/?token=7604d4734581911da8255629777035629e5fecf27db55a67
[I 10:09:05.398 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 10:09:05.408 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///run/user/16382/jupyter/nbserver-43159-open.html
    Or copy and paste one of these URLs:
        http://localhost:1234/?token=7604d4734581911da8255629777035629e5fecf27db55a67

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值