
Python自学笔记三:jupyter notebook
本机环境:macOS11.6 + Python3.7
使用pip安装
pip3 install --user jupyter如果你安装了Anaconda,那么就无需再次安装jupyter notebook,因为已经内置在里面。Anaconda是Python的数据科学发行版本,不仅自带Python软件,还内置了Jupyter、Pandas、Numpy、Matplotlib等几百种数据科学库。一次安装,应有尽有。当然全部安装的话还是比较大的,所以按需安装也不错。
安装完成后
#启动 jupyter notebook自动打开浏览器即可使用notebook
点击新建 Python 3 (ipykernel)
如果上面点击后弹出窗口提示没有Python 3 ipykernel,则需要做如下的配置
安装ipykernel
pip3 install ipykernel查看jupyter的相关kernels列表
jupyter kernelspec list再看看其具体的配置文件
cat /usr/local/share/jupyter/kernels/python3/kernel.json编辑kernel.json文件,把python3的路径写对
vi /usr/local/share/jupyter/kernels/python3/kernel.json重启notebook即可
jupyter notebook测试打印hello notebooks
测试三角函数
jupyter Notebook的配置储存在jupyter_notebook_config.py文件中,但是通常这个文件需要自己创建
jupyter notebook --generate-configPython绘图库:Matplotlib Matplotlib教程
👁️ 阅读量:0
© 版权声明:本文《Python自学笔记三:jupyter notebook》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686752284a332808.html。