赞
踩
conda create -n test python=3.10 # python版本号可自己设定
conda activate test
conda install ipykernel
python -m ipykernel install --user --name test --display-name py3.10 # py3.10替换成自己名字
conda install -c conda-forge jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
输入python进入终端,输入密码,生成哈希
>>> from notebook.auth import passwd
>>> passwd()
Enter password: .....
Verify password: .....
'..........'
jupyter notebook --generate-config
vim ~/.jupyter/jupyter_notebook_config.py
c.NotebookApp.allow_remote_access = True #允许远程连接
c.NotebookApp.ip='*' # 设置所有ip皆可访问
c.NotebookApp.password = '.........' #之前复制的密码,或者输入的字符
c.NotebookApp.notebook_dir = '/home/groupusr/longjs/runfile-ipynb' # 启动的默认目录
c.NotebookApp.open_browser = False # 禁止自动打开浏览器
c.NotebookApp.port =8888 #任意指定一个端口,默认8888
侦听窗口为本地窗口;目标端口为上述修改配置文件所设置的窗口
添加完成后点击连接或者确定
conda activate test
jupyter notebook
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。