CentOS7安装jupyter notebook
1.准备conda环境
bash XXX.sh
#重启系统
reboot
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
conda config --set auto_activate_base false
2.创建虚拟环境
#testenvironment 虚拟环境名称
#python=3.7 设置python版本
conda create -n testenvironment python=3.7
conda activate testenvironment
conda env remove -n testenvironment
3.安装jupyter notebook
#先激活虚拟环境
conda activate testenvironment
conda install -c conda-forge jupyterlab
#pip install jupyterlab -i https://pypi.douban.com/simple/
jupyter notebook --allow-root
4.添加jupyter kernel
conda activate testenvironment
pip install ipykernel -i https://pypi.douban.com/simple/
python -m ipykernel install --name testenvironment
jupyter kernelspec list
jupyter kernelspec remove testenvironment
5.插件配置
# 安装插件配置器
pip install jupyter_nbextensions_configurator -i https://pypi.douban.com/simple/
jupyter nbextensions_configurator enable
# 安装所有插件包
pip install jupyter_contrib_nbextensions -i https://pypi.douban.com/simple/
jupyter contrib nbextension install
# 安装所有主题
pip install jupyterthemes -i https://pypi.douban.com/simple/

- code prettify 美化代码
- Table of Contents(2)显示内容提纲
6.test
#在notebook中安装包
!pip install numpy pandas matplotlib -i https://pypi.douban.com/simple/
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot([1,2,3])
