- 搭建前提:虚拟机中装有linux系统(如centos,ubuntu等)
wget https://repo.continuum.io/archive/Anaconda3-5.0.1-Linux-x86_64.sh1.2 进入自己的安装目录,安装anaconda
bash Anaconda3-5.2.0-Linux-x86_64.sh
接着按Enter和yes就完事,完成安装
2. 环境配置 2.1 查看anaconda的bin目录的地址pwd #进入bin目录下查看地址2.2 添加PATH到/root/.bashrc文件中 2.3 验证结果
conda --version3. conda环境管理 3.1 创建虚拟环境
conda create -n name python=x.x3.2 使用activate激活环境
source activate python3.6.53.3 查看已有的虚拟环境 4. jupyter配置 4.1 生成配置文件
jupyter notebook --generate-config --allow-root4.2 生成登录密码
jupyter notebook password4.3 设置监听地址
sed -ie "s/#c.NotebookApp.ip = 'localhost'/c.NotebookApp.ip = '0.0.0.0'/g" ~/.jupyter/jupyter_notebook_config.py4.4 设置监听端口
sed -ie 's/#c.NotebookApp.port = 8888/c.NotebookApp.port = 3030/g' ~/.jupyter/jupyter_notebook_config.py5. 启动jupyter 5.1 启动服务
jupyter notebook --allow-root &5.2 后台运行服务
nohup jupyter notebook --allow-root > jupyter.log 2>&1 &6. 内网穿透
ssh -R 80:127.0.0.1:3030 ssh.localhost.run7. 验证
- 输入上述地址进行验证



