安装环境
在阿里云买了个服务器,操作系统是ubuntu,本文会实现在服务器上安装jupyter notebook并在windows访问。
安装jupyter
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3-pip
sudo pip3 install jupyter
生成配置文件
jupyter notebook --generate-config
# 若成功,会出现 Writing default config to: /root/.jupyter/jupyter_notebook_config.py
ipython
In [1]: from notebook.auth import passwd
In [2]: passwd()
Enter password:
Verify password:
Out[2]: 'sha1:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed'
# 这串密码复制下来
修改配置文件
vim /root/.jupyter/jupyter_notebook_config.py
a #代表进入编辑模式
更多关于vim的用法,可以点击链接查看。
然后在在 jupyter_notebook_config.py 中找到下面的行,取消注释并修改。
c.NotebookAp