安装Anaconda 和 Jupyter
1 2 3 4
| wget https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh chmod +x Anaconda3-2019.03-Linux-x86_64.sh yum install -y bzip2 ./Anaconda3-2019.03-Linux-x86_64.sh
|
安装过程中遇见 yes/no
选择 yes
,其他的默认回车。
安装结束后运行 source ~/.bashrc
生成Jupyter Notebook配置文件
1
| jupyter notebook --generate-config
|
修改Jupyter配置文件允许Root启动
1 2
| vim /root/.jupyter/jupyter_notebook_config.py 将c.NotebookApp.allow_root = False前边的 '#'去掉,在把False修改为True
|
生成密码
1 2 3 4 5 6
| 打开 ipython //直接输入ipython from notebook.auth import passwd passwd() Enter password: //输入一次密码 Verify password: //再次输入密码 sha1:ae9e423f48ae:a8................................ //复制下来,下面要用。
|
再次修改配置文件
1 2 3 4 5 6 7
| vim /root/.jupyter/jupyter_notebook_config.py // 将下面内容前面的注释删掉,并修改一些内容。 c.NotebookApp.ip='*' c.NotebookApp.password = 'sha1:ae9e423f48aea8xxxxxx' //这个密码是上面生成的。 c.NotebookApp.allow_remote_access = True c.NotebookApp.open_browser = False c.NotebookApp.port = 9999 //默认8888,改不改都行。
|
启动
1 2
| jupyter notebook //记得先关掉Firewall
|
后台运行 jupyter notebook
1
| nohup jupyter notebook > /root/python-note/jupyter.log 2>&1 &
|
该命令将使得 Jupyter 在后台运行,并将日志写在 /root/python-note/jupyter.log
文件中。
在 anaconda
中安装 opencv
![jupyter]()