首页 > 其他分享 >jupyter 安装配置

jupyter 安装配置

时间:2022-08-14 17:14:09浏览次数:76  
标签:00 jupyter -- 配置 notebook nbextensions NotebookApp 安装

jupyter 安装配置

参考文章

虽然不建议用root权限去运行pip或者jupyter,但是暂时为了方便省事,以下使用是的root权限。

# 安装
pip install jupyter notebook
# 利用python 生成jupyter 密码,
python3
    >>> from notebook.auth import passwd
    >>> passwd()
	# 输入密码后,生成字符串复制
    >>> exit()

# 生成配置文件,记住目录,下面会用到
    jupyter notebook --generate-config 
# 打开配置文件,jupyter_notebook_config.py位置会有所不同,勿直接复制
    vim /home/ubuntu/.jupyter/jupyter_notebook_config.py

# 建议修改以下内容
    c.NotebookApp.allow_remote_access = True #允许远程连接
    c.NotebookApp.ip='0.0.0.0' # 设置所有ip皆可访问
    c.NotebookApp.password = 'argon2:$argon2id$v=19$m=10240,t=10,p=8$4EIqux1hNfgkFuqoWiEnUQ$k/CAr9P2J4/5GlBcsXTnJA' #之前复制的密码
    c.NotebookApp.open_browser = False # 禁止自动打开浏览器
    c.NotebookApp.port =8888 #任意指定一个端口
    c.NotebookApp.notebook_dir ='/home/ubuntu/programes/'

### 提示: vim中/是搜索,n是前进查找,N是后退查找,u是撤回操作,i是插入,dd是删除整行,x是删除单个字符

#jupyter 补全插件
#安装nbextensions
    pip install jupyter_contrib_nbextensions
    jupyter contrib nbextension install --user
#安装 nbextensions_configurator
    pip install jupyter_nbextensions_configurator
    jupyter nbextensions_configurator enable --user
#重启jupyter

# 启动操作
    jupyter notebook > jupyter.log 2>&1 &
    
# 停止jupyter
	jupyter notebook stop
# 进程杀死jupyter,一般是第一个/usr/local/bin/jupyter-notebook
	ps -ef | grep jupyter-notebook
	kill XXX
#例子:#ps -ef | grep jupyter-notebook
#root      8687     1  0 16:31 pts/1    00:00:04 /usr/bin/python /usr/local/bin/jupyter-notebook
#root      8852  8629  0 16:51 pts/1    00:00:00 grep --color=auto jupyter-notebook
#kill 8687

推荐图形化资源管理器 btop,可杀死进程。

标签:00,jupyter,--,配置,notebook,nbextensions,NotebookApp,安装
From: https://www.cnblogs.com/auspice/p/16585769.html

相关文章

  • vscode c语言配置
    目录vscode插件字体大小编译配置设置coderunner设置如何运行/停止?vscode插件chineseC/C++coderunner字体大小右下角齿轮->设置->搜索字体->Editor:FontSizer......
  • 【win10】安装appnium环境
    1、官网http://appium.io/ 2、github https://github.com/appium/appium-desktop/releases/tag/v1.22.3-4       3、安装配置java环境https://www......
  • 解决小白安装vue-router后项目报错问题
    本人也正在学习Vue,记录一下学习过程中的问题今天用npminstallvue-router--save-dev命令安装vue-router,安装后启动项目报然后就开始搜大家的解决办法,说是可能vue版......
  • 安装MMdetection3D和MinkowskiEngine
    MMdetection3D更新了,只好再次安装,由于CUDA,cuDNN,PyTorch以前已经安装了,这次就不需要安装了,只需要安装MMdetection3D就行了.1. 安装MMCV输入以下命令:pipinstall......
  • 在Linux安装ElasticSearch
    注:本文根据elasticsearch中文文档整理而来:https://learnku.com/docs/elasticsearch73/7.3/get-elasticsearch-up-and-running/6449参考:https://blog.csdn.net/xiaoai1994/......
  • 二、docker安装
    一、docker安装Docker是管理容器的工具,Docker不等于容器。1.1、dockeryum源设置#step1downloaddocker-ce.repofile[root@zutuanxue~]#wgethttps://downlo......
  • Ubuntu 20.04 配置静态IP地址
    vim/etc/netplan/00-installer-config.yaml#Thisisthenetworkconfigwrittenby'subiquity'network:ethernets:ens160:dhcp4:noaddresse......
  • tesseract-ocr 安装、语言库、使用 随记
    前几日才听说ocr的图片识别功能。觉得很有意思。先体验一下。地址: GitHub-tesseract-ocr/tesseract:TesseractOpenSourceOCREngine(mainrepository)1.下载exe......
  • pytest.ini文件配置说明
    https://www.cnblogs.com/Avicii2018/p/16391336.html 问题描述:写好test.py文件和pytest.ini文件后,报错:UnicodeDecodeError:'gbk'codeccan'tdecodebyte0xb01......
  • ubuntu安装BricsCAD
    目录目录下载软件包安装deb软件包sudodpkg-i*.deb将Crack/bricsys.lic中hostid=<YOURHOSTID>替代本机MAC地址......