Linux Jupyter 安装

前提:安装了miniconda

1、安装jupyter


python3 -m pip install jupyter

2、生成jupyter配置文件


#root用户:
jupyter notebook --generate-config --allow-root
#非root用户
jupyter notebook --generate-config

/home/mydev/.jupyter/jupyter_notebook_config.py

3、打开ipython,生成密码

ipython
from notebook.auth import passwd
passwd() – 输入密码并按回车确认
输入密码后,会生成秘钥,稍后用到,

 4、修改配置文件


vi /home/mydev/.jupyter/jupyter_notebook_config.py

– 允许访问的IP
c.NotebookApp.ip = ‘*’   
– ipynb文件保存地址
c.NotebookApp.notebook_dir = ‘/home/mydev/app/jupyder’
c.NotebookApp.open_browser = False
c.NotebookApp.password = u’sha1:*********’
c.NotebookApp.port = 8888

5、启动jupyter

. ~/.bash_conda
conda activate common
– root用户
jupyter notebook --allow-root
– 非root用户
jupyter notebook

6、浏览器访问

http://xxx.xx.xx.xxx:8888 输入密码

7、关闭jupyter

  netstat -ntulp | grep 8888

[mydev@i-siqi03 ~]$  netstat -ntulp | grep 8888
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:8888            0.0.0.0:*               LISTEN      32889/python3       
tcp6       0      0 :::8888                 :::*                    LISTEN      32889/python3  


kill -9 32889

 8、安装数据挖掘包

conda list
conda install numpy
conda install matplotlib
conda install scipy
conda install pandas
conda install statsmodels
conda install scikit-learn

9、jupyter代码自动补全

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,在根目录下,点击Nbextensions标签页,勾选Hinterland即可。

参考:Linux下安装配置Jupyter notebook并启动_青山呦的博客-优快云博客_linux安装jupyter notebook

jupyter配置代码自动补全 - 简书

数据挖掘学习(一)——常用的python包_livan1234的博客-优快云博客_python数据包

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值