您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

为什么从Terminal和Atom调用时python的版本不同

为什么从Terminal和Atom调用时python的版本不同

好吧,其实我不得不改变Path.json的jupyter内核文件。首先,我检查了jupyter内核列表:

$ jupyter kernelspec list
julia-0.6    /Users/mymac/Library/Jupyter/kernels/julia-0.6
julia-1.0    /Users/mymac/Library/Jupyter/kernels/julia-1.0
python3      /Users/mymac/Library/Jupyter/kernels/python3

然后cd,我在上面的python路径中找到了文件kernel.json并打开了它:

{
 "argv": [
  "/path/to/python",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}"
 ],
 "display_name": "Python 3",
 "language": "python"
}

在该文件中,然后/path/to/python通过在终端中键入以下命令时得到的python路径更改行:

$ which python
/Users/mymac/anaconda3/bin/python

重新启动Atom,终于成功了!

jupytergithub页面的提示很有帮助

python 2022/1/1 18:37:41 有241人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶