本地搭建JupyterNotebook开发环境
背景
Jupyter 是一款优秀的编程语言运行环境包括Hub、Lab、Notebook等优秀自项目,JupyterNotebook是衍生的在线交互运行平台的前端项目
环境
- Windows 11
- Node 18 (要求>16)
- npm 6 (要求<7)
步骤
- clone项目,切换到稳定分支,如5.7.x,在线地址:https://github.com/jupyter/notebook
- 安装依赖,先通过python安装Jupyter的其他组件,notebook项目依赖其他组件
pip install jupyter
pip install jupyterlab
- 项目安装
yarn install
- 项目打包【可选】
- 由于网络问题可能导致bower命令执行失败,加载github相关网站资源加载不到,在项目的.bowerrc文件中增加bower proxy,亲测有用,git和npm暂不用设置
yarn run build
#bower
"proxy": "http://127.0.0.1:10809",
"https-proxy": "http://127.0.0.1:10809",
"strict-ssl": false
#git
[http]
proxy = http://127.0.0.1:10809
[https]
proxy = http:127.0.0.1:10809
[url "https://"]
insteadOf = git://
#npm
npm config set proxy http://127.0.0.1:10809
npm config set https-proxy http://127.0.0.1:10809
#手动拷贝文件
notebook\static\components\jquery\dist\jquery.min.js -> \notebook\static\components\jquery\jquery.min.js
- notebook卸载
pip uninstall jupyter -y
pip uninstall jupyter_core -y
pip uninstall jupyter-client -y
pip uninstall jupyter-console -y
pip uninstall notebook -y
pip uninstall qtconsole -y
pip uninstall nbconvert -y
pip uninstall nbformat -y
- 启动项目
python3 -m notebook --port 8989
启动起来就能访问了
后记
- 切换版本以后再CONTRIBUTING.rst文件里有完整的开发环境搭建方法,确实非常非常的难找
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)