miniconda安装以及下载jupyter notebook
- 
下载miniconda(官方源)
 
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.10.3-Linux-x86_64.sh
- 
运行下载文件
sh Miniconda3-py38_4.10.3-Linux-x86_64.sh一直Enter,可以选择一定义初始化(conda init)也可手动输入
 - 
重启在用户名前出现(base)
 - 
下载jupyter notebook
 
conda install jupyter notebook
- 
生成配置文件
 
   jupyter notebook --generate-config
3.1. 自动生成  从 jupyter notebook 5.0 版本开始,提供了一个命令来设置密码:jupyter notebook password,生成的密码存储在 jupyter_notebook_config.json。
  ```
  $ jupyter notebook password
  Enter password:  ****
  Verify password: ****
  [NotebookPasswordApp] Wrote hashed password to /Users/you/.jupyter/jupyter_notebook_config.json
  ```
3.2. 手动生成  除了使用提供的命令,也可以通过手动安装,我是使用的手动安装,因为jupyter notebook password 出来一堆内容,没耐心看。打开 ipython 执行下面内容:
  ```
  In [1]: from notebook.auth import passwd
  In [2]: passwd()
  Enter password:
  Verify password:
  Out[2]: 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'
  ```
  `sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed` 这一串就是要在 `jupyter_notebook_config.py` 添加的密码。
  
  ```
  c.NotebookApp.password = u'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'
  ```
  ### 3. 修改配置文件
  在 `jupyter_notebook_config.py` 中找到下面的行,取消注释并修改。
  ```
  c.NotebookApp.ip='*'#163行
  c.NotebookApp.password = u'sha:ce...刚才复制的那个密文'  #217行
  c.NotebookApp.open_browser = False#208
  c.NotebookApp.port =8888 #可自行指定一个端口, 访问时使用该端口228行
  ```
  以上设置完以后就可以在服务器上启动 jupyter notebook,`jupyter notebook`, root 用户使用 `jupyter notebook --allow-root`。打开 `IP:指定的端口`, 输入密码就可以访问了。
参考博客https://www.cnblogs.com/wu-chao/p/8419889.html
                    
                
                
            
        
浙公网安备 33010602011771号