admin管理员组文章数量:1666625
1,下载miniforge3
GitHub - conda-forge/miniforge: A conda-forge distribution.
下载下来后傻瓜式安装就可以了
配置环境变量,在系统环境变量的path添加下列就行了,根据自己的路径修改
2,创建虚拟环境
conda create -n test python=3.10
(不知道python版本,可以用python --version打印出来就知道了)
conda init (初始化conda配置,它会在shell配置文件添加conda激活逻辑)
3,安装jupyter-lab
建议进入虚拟环境下执行
pip install jupyter-lab
生成并配置jupyterlab文件
jupyter lab --generate-config
执行上述命令后会返回一个upyter_lab_config.py的文件路径,复制路径找到文件进行下列配置
配置文件内容修改如下
c = get_config() #noqa
c.ServerApp.root_dir = '/soft/python-project' # 工作路径
c.ServerApp.allow_remote_access = True
c.ServerApp.ip = '*'
c.LabApp.open_browser = False
c.ServerApp.port = 8701
c.ServerApp.iopub_data_rate_limit = 1.0e10
4,将虚拟环境设置到jupyter-lab上生效
conda install ipykernel
python -m ipykernel install --user --name 自己虚拟环境名 --display-name "jupyter自定义名字"
jupyter-lab --allow-root
(执行完这个命令会弹出一段文字,里面有两个url,可以登录页面版的jupyter notebook
http://localhost:8701/lab?token=026e943b886e2826aebf4f64d1ffee8c320594b010d711f5
)
5,常用的一些命令
conda env list 查看有哪些虚拟环境
conda activate test 激活test虚拟环境
deactivate test 关闭test虚拟环境
jupyter kernelspec list 查看有哪些kernel
jupyter kernelspec remove 虚拟环境名 删除某个kernel
本文标签: WindowsMiniforgeJupyterLab
版权声明:本文标题:windows上安装miniforge和jupyterlab 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1730073872a1221614.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论