linux多虚拟环境安装jupyter notebook

1.linux环境下载python虚拟环境Miniconda包
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh

2.安装Miniconda依赖包
yum -y install bzip2

3.安装
sh Miniconda3-latest-Linux-x86_64.sh

4.配置改别名
vim /root/.bashrc
...
#alias for conda
alias cl="conda env list"
alias cc="conda create -n"
alias coa="source activate"
alias cod="source deactivate"
alias cr="conda remove --all -n"
...
:wq

5.创建一个python虚拟环境
cc lcs
coa lcs

6.安装jupyter notebook
pip install jupyter notebook

7.检查是否安装
pip freeze |grep jupyter

8.修改配置文件
jupyter notebook --generate-config
vim /root/.jupyter/jupyter_notebook_config.py

c.NotebookApp.notebook_dir = '/root/notebook' # notebook默认目录
.....
c.NotebookApp.ip = '*'
#c.NotebookApp.password = u'sha1:bcd259ccf...<your hashed password here>'
c.NotebookApp.open_browser = False
:wq

jupyter notebook password
jupyter notebook --allow-root

9.客户端浏览器登陆jupyter

扫描二维码关注公众号,回复: 2293089 查看本文章

51cto博客:de8ug
Jupyter官方文档:http://jupyter-notebook.readthedocs.io/en/latest/notebook.html

猜你喜欢

转载自blog.51cto.com/13587169/2148151