给VPS linux CentOS 7 安装Anaconda jupyter
我的系统是CentOS 7
第一步 https://repo.continuum.io/archive/ 找到适合自己版本的64位安装包 如Anaconda3-2020.02-Linux-x86_64.sh
第二步 安装 命令
wget https://repo.continuum.io/archive/Anaconda3-2020.02-Linux-x86_64.sh
bash Anaconda3-2020.02-Linux-x86_64.sh
conda 查看安装状态
第三步 进入ipython 输入ipython
进入后
from notebook.auth import passwd passwd() #输入方便你记的密码,连续输;两次..输完密码后,会输出一个字符串,形如: ’sha1:9e7************************888’ #将其保存下来, 完成以上操作后,通过exit()推出ipython环境
第四步 配置jupyter notebook
进入到安装目录:cd /root/anaconda3/etc/jupyter, 执行 :
jupyter notebook --generate-config
#(命令会产生配置文件:root/.jupyter/jupyter_notebook_config.py)
vi jupyter_notebook_config.py
c.NotebookApp.ip = '*' #允许访问此服务器的 IP,星号表示任意 IP c.NotebookApp.password = u'sha1:*******************************8c' # 之前生成的密码 hash 字串 c.NotebookApp.open_browser = False # 运行时不打开本机浏览器 c.NotebookApp.port = 2799 # 使用的端口,随意设置 c.NotebookApp.enable_mathjax = True # 启用 MathJax c.NotebookApp.allow_root = True c.NotebookApp.notebook_dir = u'/root/JupyterNotebook' #工作目录,保存代码项目文件。
退出文件并保存 :wq
这样就安装完毕了,重启VPS
然后 jupyter notebook 启动
如果要后台一直跑,不随你的xshell 关闭而停止运行,
nohup jupyter notebook &
进入到你的VPS IP 如111:111:111:11:2799,成功了