美文网首页Python工作笔记
Jupyter安装和配置

Jupyter安装和配置

作者: txfly | 来源:发表于2019-10-25 12:18 被阅读0次

    本文主要介绍jupyter基本安装和配置。
    使用环境:Ubuntu18 + Python3.6

    安装Jupyter

    python3 -m pip install --upgrade pip
    python3 -m pip install jupyter --user
    

    完成后,Jupyter安装在~/.local/bin目录下。
    运行Jupyter(如果提示找不到Jupyter,需要重启终端):

    jupyter notebook
    

    安装扩展

    pip3 install jupyter_contrib_nbextensions --user
    jupyter contrib nbextension install --user
    jupyter nbextensions_configurator enable --user 
    

    安装完成后,刷新浏览器显示如下:

    扩展
    比较推荐的扩展有:
    • Execute Time,单元格运行时间,使用Cython的时候,可以用来看编译是否完成。
    • Hinterland, 代码补全。

    修改多行输出:
    进入C:\Users\username\.ipython\profile_default目录(将其中username替换真实用户名),创建ipython_config.py文件,内容为:

    c = get_config()
    c.InteractiveShell.ast_node_interactivity = "all"
    
    保存后重启NoteBook,就可以输出多行了。 输出多行

    版权声明:本文为「txfly」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://www.jianshu.com/p/5ad139fb500a

    相关文章

      网友评论

        本文标题:Jupyter安装和配置

        本文链接:https://www.haomeiwen.com/subject/warsvctx.html