安装 jupyter

conda activate learning
pip install jupyter
jupyter notebook --generate-config	#生成配置文件
(learning) C:\Users\Administrator>python
Python 3.7.9 (default, Aug 31 2020, 17:10:11) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from IPython.lib import passwd
>>> passwd()
Enter password:#设置一个登陆密码
Verify password:#重复输入登陆密码
'sha1:*************************************'

修改默认配置文件

windows默认配置文件地址在C:\Users\Administrator\.jupyter\jupyter_notebook_config.py
用记事本打开这个python文件
添加如下几行命令:

c.NotebookApp.ip = '*'                    #设置远程所有ip可访问
c.NotebookApp.open_browser = False        #关闭浏览器
c.NotebookApp.password=u'sha1:******************************'      #输入上面生成的密码
c.NotebookApp.port = 8181                 #随意设置一个端口号
c.NotebookApp.allow_remote_access = True  #允许远程连接

保存配置并激活

conda activate learning
jupyter notebook --config C:\Users\Administrator\.jupyter\jupyter_notebook_config.py

远程登录

客户端输入http://服务器IP:端口号

http://192.168.1.10:8181
Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐