ubuntu安装jupyter操作比较简单,ubuntu20.04上自带python3.8,我们直接使用pip进行安装jupyter即可
pip install jupyter -i https://pypi.tuna.tsinghua.edu.cn/simple
然后生成jupyter配置文件
jupyter notebook --generate-config
执行该命令会生成jupyter配置文件到/root/.jupyter/jupyter_notebook_config.py
接着我们设置下密码,进入ipython环境
ipython from notebook.auth import passwd passwd() #调用passwd()来设置密码
接着两次输入密码就可以使用exit()命令退出了,记录下生成密码(密钥)
然后修改jupyter默认的配置文件
vi /root/.jupyter/jupyter_notebook_config.py #搜索修改配置或者取消注释 c.NotebookApp.port = 8888 c.NotebookApp.open_browser = False #是否自动打开默认浏览器 c.NotebookApp.password= "argon2:$argon2id$v=19$m=10240,t=10,p=8$1qKV76xxqwnm2tDbus1TEw$fpYOLNAq1Yfv03ExzHN43NEQFhJETxh2Sf4hGj4jtMA"
然后保存退出,可以使用以下方式运行
普通运行方式
jupyter notebook #普通运行方式 jupyter notebook ---allow-root #使用root权限运行 jupyter notebook --ip=0.0.0.0 --port=8080 --no-browser --allow-root >~/jupyter.log 2>&1 #指定参数运行
完成以后我们可以使用http://ip:8888的方式进行访问,访问时会让输入刚才咱们设置的密码。
内容版权声明:除非注明,否则皆为本站原创文章。
相关推荐
- ubuntu22.04编译安装postgresql17.5
- ubuntu使用deb包安装指定版本内核
- ubuntu修改grub引导切换到指定内核的方法
- ubuntu使用nvbandwidth测试单节点gpu带宽性能
- ubuntu24.04LTS添加apt源
- ubuntu下使用qperf工具测试RDMA网络带宽和延迟
- 在jupyter notebook中切换conda虚拟环境
- ubuntu22.04关闭自动更新和禁止unattended-upgrades服务开机启动
- ubuntu22.04使用nccl-tests进行单机多卡通信测试
- ubuntu22.04编译安装hwloc/libevent/ucx/openpmix/openmpi
评论列表