pip安装jupyter notebook

  之前电脑安装了anaconda,里面安装了jupyter notebook,用来做PPT之类的展示总让我觉得有点“炫酷”。

  现在换了新电脑。没有anaconda,纯粹只是装了python3.11,然后突然也想手工安装下jupyter notebook,于是只能通过pip方式来安装了。

  在没参考任何文档的情况下,想当然的pip install jupyter 和pip install notebook两条命令。安装成功后,执行在终端执行 jupyter notebook命令。浏览器窗口自动打开,看到了熟悉的界面,打开我已有的一个demo.ipynb文件,能够单元格的run,但没办法幻灯片方式播放。网上搜索了下,应该是需要安装RISE。于是又执行pip install RISE;相当了要用到nbconvert,再执行了pip install nbconvert;结果还是不行,又瞎折腾的执行了pip install jupyter_contrib_nbextensions 和 jupyter contrib nbextension install,以及jupyter-nbextension install rise --py --sys-prefix 一顿猛操作后发现还是不行,然后观察终端屏幕,发现有一个错误提醒是: ModuleNotFoundError: No module named 'notebook.base'

  原来是notebook版本不匹配。果断pip install notebook==6.1.0 把notebook还到6.1.0,然后执行jupyter nbextension enable rise --py --sys-prefix,再执行jupyter notebook发现这次终于有幻灯片播放的功能了。

  最后把可能相关用到的库名和对应的版本记录如下:方便大家和自己下次安装时选择对应的正确版本。

C:\>pip list
Package                           Version
--------------------------------- -----------
ipykernel                         6.25.0
ipython                           8.14.0
ipython-genutils                  0.2.0
ipywidgets                        8.0.7
jupyter                           1.0.0
jupyter_client                    8.3.0
jupyter-console                   6.6.3
jupyter-contrib-core              0.4.2
jupyter-contrib-nbextensions      0.7.0
jupyter_core                      5.3.1
jupyter-events                    0.6.3
jupyter-highlight-selected-word   0.2.0
jupyter-lsp                       2.2.0
jupyter-nbextensions-configurator 0.6.3
jupyter_server                    2.7.0
jupyter_server_terminals          0.4.4
jupyterlab                        4.0.3
jupyterlab-pygments               0.2.2
jupyterlab_server                 2.24.0
jupyterlab-widgets                3.0.8
nbclient                          0.8.0
nbconvert                         7.7.3
nbformat                          5.9.1
notebook                          6.1.0
notebook_shim                     0.2.3
rise                              5.7.1

 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值