linux云服务器安装配置anaconda
一、使用清欢镜像下载相对应版本的Anaconda
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2020.02-Linux-x86_64.sh
二、安装anaconda3
bash Anaconda3-2020.02-Linux-x86_64.sh
中见一路默认或者yes
到此anaconda安装已经完成,如果需要在外网上访问继续向下看
三、如果需要使用新的环境
conda install -n name python=3.8
如果要卸载anaconda3,使用 rm -rf anaconda3。
四、如果安装完后,没有出现base环境,则进入 /anaconda3/lib环境下
chmod 777 activate
source ./activate
四、配置jupyter notebook远程访问
在新生成的环境中设置:
jupyter notebook --generate-config
ipython
-
In [1]: from notebook.auth import passwd
-
In [2]: passwd()
-
Enter password:
-
Verify password:
-
Out[2]: 'sha1:8XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXf'
生成配置文件:
默认jupyter notebook 是不需要配置文件的
vi /root/.jupyter/jupyter_notebook_config.py
-
c.NotebookApp.ip = '*'
-
c.NotebookApp.password = 'sha1:8XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxf'
-
c.NotebookApp.open_browser = False
-
c.NotebookApp.port = 8888
-
c.NotebookApp.allow_remote_access = True
-
c.NotebookApp.allow_root = True
配置完成之后就可以启动。但是一般使用后台程序方式进行。最后加&表示后台运行,关闭终端也会继续运行。
nohup jupyter notebook --allow-root &

浙公网安备 33010602011771号