1. 参考文档

jupyter notebook安装使用.docx

2. 安装过程中遇到的问题

  1. 这将启动一个基于tornadoHTML笔记本服务器,它提供一个html5/
  2. javascript笔记本客户端。
  3. Traceback (most recent call last):
  4. File "/usr/bin/jupyter-notebook", line 8, in <module>
  5. sys.exit(main())
  6. File "/usr/lib/python2.7/site-packages/jupyter_core/application.py", line 270, in launch_instance
  7. return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  8. File "/usr/lib/python2.7/site-packages/traitlets/config/application.py", line 663, in launch_instance
  9. app.initialize(argv)
  10. File "<string>", line 2, in initialize
  11. File "/usr/lib/python2.7/site-packages/traitlets/config/application.py", line 89, in catch_config_error
  12. app.print_help()
  13. File "/usr/lib/python2.7/site-packages/traitlets/config/application.py", line 386, in print_help
  14. self.print_subcommands()
  15. File "/usr/lib/python2.7/site-packages/traitlets/config/application.py", line 378, in print_subcommands
  16. print(os.linesep.join(lines))
  17. UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 4: ordinal not in range(128)

解决办法

  1. LANG=zn jupyter notebook

3.远程访问设置

  1. jupyter notebook --ip='0.0.0.0'

安装 matplotlib 依赖出现的错误

  1. ERROR: Command errored out with exit status 1:
  2. command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-GaajiC/subprocess32/setup.py'"'"'; __file__='"'"'/tmp/pip-install-GaajiC/subprocess32/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-w2ML6g
  3. cwd: /tmp/pip-install-GaajiC/subprocess32/
  4. Complete output (62 lines):
  5. /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'

解决方案
执行一下语句:

  1. /usr/bin/pip install --upgrade pip setuptools

再次执行的时又出现错误

  1. -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c _posixsubprocess.c -o build/temp.linux-x86_64-2.7/_posixsubprocess.o
  2. _posixsubprocess.c:16:20: 致命错误:Python.h:没有那个文件或目录
  3. #include "Python.h"
  4. ^
  5. 编译中断。
  6. error: command 'gcc' failed with exit status 1
  7. ----------------------------------------
  8. ERROR: Failed building wheel for subprocess32

执行一下指令

  1. yum install python-devel

再次执行的时候,问题解决了