栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

计算机图像处理之jupyter安装运行

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

计算机图像处理之jupyter安装运行

文章目录
  • pip安装
  • 配置环境变量
  • jupyterlab
    • 安装
    • 生成配置文件
    • cmd启动
    • 其它一些小功能

pip安装
pip3 install jupyter

配置环境变量


出现这种问题就是卸载安装的破玩意

pip uninstall -y jupyter
pip uninstall -y jupyter_core
pip uninstall -y jupyter-client
pip uninstall -y jupyter-console
pip uninstall -y notebook
pip uninstall -y qtconsole
pip uninstall -y nbconvert
pip uninstall -y nbformat

开个玩笑,需要在用户变量下的Path中配置环境变量

点击此电脑,右键选择属性,选择环境变量

然后添加路径,再重启输入jupyter notebook就好了

jupyterlab

jupyterlab说是替代jupyter notebook的新产品

安装
pip3 install jupyterlab  -i https://pypi.doubanio.com/simple/
生成配置文件
jupyter notebook --generate-config
cmd启动
jupyter lab --allow-root

其它一些小功能

生成登录密码

python3 -c 'from notebook.auth import passwd; print(passwd("usepassword"));'

修改默认的配置文件

vim ~/.jupyter/jupyter_notebook_config.py
#设定ip访问,允许任意ip访问
c.NotebookApp.ip = '0.0.0.0'
#不打开浏览器
c.NotebookApp.open_browser = False
#用于访问的端口,设定一个不用的端口即可,这里设置为8000
c.NotebookApp.port = 8000
#设置登录密码(上一步生成的密码复制过来)
c.NotebookApp.password = 'sha1:3d83edcdecd3:9da52a53d7b329886333066a50d0a948ed5cd7c4'
#设置jupyter的工作路径
c.NotebookApp.notebook_dir = '/data/jupyter'
c.PAMAuthenticator.encoding = 'utf8'  

使用Supervisor 来管理jupyter 进程

yum install supervisor -y && systemctl start supervisord.service && systemctl enable supervisord.service
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/581039.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号