1 安装conda

2 conda环境下安装jupyter

pip install jupyter

3 设置jupyter配置文件

1)创建 jupyter_notebook_config.py文件

jupyter notebook --generate-config

2)设置密码

3)设置参数

直接将以下参数修改为自己的配置后复制到配置文件 jupyter_notebook_config.py 中即可:

c.ServerApp.allow_root = True
c.ServerApp.allow_remote_access = True
c.ServerApp.ip = 'localhost'
c.ServerApp.password = u'sha1:9eddf5e37b4f:499893f234c8b217401acc2d04a2299a752b8e4a' 
c.ServerApp.open_browser = True
c.ServerApp.port = 8888

4 使用jupyter notebook

方法1:浏览器使用

1)直接打开cmd进入目标目录,进入conda环境下运行 jupyter notebook。

2)会自动打开浏览器,即可使用 jupyter

3)运行成功

方法2:pycharm 使用

1)直接打开cmd进入目标目录,进入conda环境下运行 jupyter notebook。

2)打开pycharm配置 jupyter 服务器

3)运行成功

浏览器界面覆盖说明

当在浏览器修改代码后:选择overwrite

当在pycharm修改代码后:选择revert

更多推荐