python使用jupyter notebook

勤奋不是嘴上说说而已,而是实际的行动,在勤奋的苦度中持之以恒,永不退却。业精于勤,荒于嬉;行成于思,毁于随。在人生的仕途上,我们毫不迟疑地选择勤奋,她是几乎于世界上一切成就的催产婆。只要我们拥着勤奋去思考,拥着勤奋的手去耕耘,用抱勤奋的心去对待工作,浪迹红尘而坚韧不拔,那么,我们的生命就会绽放火花,让人生的时光更加的闪亮而精彩。

导读:本篇文章讲解 python使用jupyter notebook,希望对大家有帮助,欢迎收藏,转发!站点地址:www.bmabk.com,来源:原文

安装

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple jupyter

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  jupyter_contrib_nbextensions

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple  jupyter_nbextensions_configurator

jupyter nbextensions_configurator enable --user

启动

jupyter notebook
[I 21:54:27.997 NotebookApp] Writing notebook server cookie secret to D:\Users\LENOVO\AppData\Roaming\jupyter\runtime\notebook_cookie_secret
[I 21:54:28.615 NotebookApp] Serving notebooks from local directory: D:\Python\Python38
[I 21:54:28.615 NotebookApp] Jupyter Notebook 6.2.0 is running at:
[I 21:54:28.616 NotebookApp] http://localhost:8888/?token=a4059ad235b19bc7aa125077f19cbaeb5e2998e17038700e
[I 21:54:28.616 NotebookApp]  or http://127.0.0.1:8888/?token=a4059ad235b19bc7aa125077f19cbaeb5e2998e17038700e
[I 21:54:28.616 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 21:54:28.700 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///D:/Users/LENOVO/AppData/Roaming/jupyter/runtime/nbserver-11272-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=a4059ad235b19bc7aa125077f19cbaeb5e2998e17038700e
     or http://127.0.0.1:8888/?token=a4059ad235b19bc7aa125077f19cbaeb5e2998e17038700e
[I 21:55:55.452 NotebookApp] 302 GET /?token=a4059ad235b19bc7aa125077f19cbaeb5e2998e17038700e (127.0.0.1) 1.000000ms
[I 21:56:52.412 NotebookApp] Interrupted...
[I 21:56:52.414 NotebookApp] Shutting down 0 kernels
[I 21:56:52.416 NotebookApp] Shutting down 0 terminals

使用浏览器要求输入密码

在这里插入图片描述
请输入

请输入token=a4059ad235b19bc7aa125077f19cbaeb5e2998e17038700e中的value

查看启动的列表

jupyter notebook list
Currently running servers:
http://localhost:8889/?token=ca4189e7a2ceedecb2157fe0fd981bee90197604c37320bf :: D:\Users\LENOVO\PycharmProjects\sql_server

使用界面

在这里插入图片描述

%time 和 %timeit

%time可以测量一行代码执行的时间
%timeit可以测量一行代码多次执行的时间

代码补齐功能

Jupyter Notebook代码提示及补齐功能
https://blog.csdn.net/cjw12581/article/details/104835296/

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/140783.html

(0)
飞熊的头像飞熊bm

相关推荐

发表回复

登录后才能评论
极客之音——专业性很强的中文编程技术网站,欢迎收藏到浏览器,订阅我们!