jupyter多python版本环境配置
基本安装
简单记录在mac平台如何为conda配置多个python版本。
首先保证安装好conda环境,anaconda或miniconda都可以。
1、安装jupyter-notebook
1 | conda install notebook |
2、在你需要添加的python版本中安装ipykernel
1 | pip3.8 install ipykernel |
3、为jupyter添加kernel
1 | python3.8 -m ipykernel install --user --name python3.8 --display-name "python3.8" |
下面是常用的命令: 查看所有kernel
1 | jupyter kernelspec list |
如果需要卸载某些kernel
1 | jupyter kernelspec remove [kernel_name] |
安装插件
1 | conda install -c conda-forge jupyter_contrib_nbextensions |
如果报错jupyter contrib nbextension install --user pkg_resources.DistributionNotFound webcolors and format-nongpl error,可能是有些依赖没有安装上,手动安装一下:
1 | conda install -c conda-forge jsonschema-with-format-nongpl |
然后再次运行jupyter contrib nbextension install --user即可。
最后,关于jupyter的更多使用,这篇文章介绍得很详细,可以参考:一文弄懂Jupyter的配置与使用(呕心沥血版)
本博客所有文章除特别声明外,均采用 CC BY-NC-ND 4.0 许可协议。转载请注明来自 Black Flies!
评论