无法找到Jupyter Notebook内核

时间:2017-01-07 05:21:19

标签: python ipython jupyter-notebook jupyter

我目前使用的是Mac。我最近创建了一个新的python虚拟环境并安装了jupyter。当我在虚拟环境中激活jupyter笔记本时,它说它找不到任何python内核。我有另一个虚拟环境,也安装了jupyter,它工作得非常好。有人可以帮忙吗?另外,我不确定内核在我的机器上的位置。 Library / Jupyter只有一个运行时文件夹。

2 个答案:

答案 0 :(得分:1)

我需要做两件事才能使它起作用:
conda install -y ipykernel
python -m ipykernel install --user --name myenv

有点沮丧,我从没在文档中看到太多提及。我认为Jupyter的建立仍然是一个相当痛苦的过程。如果能帮助任何人,这是从头到尾的:

conda create -n myenv python=3.7
conda activate myenv
conda install -y -c conda-forge jupyterlab
conda install -y -c anaconda jupyter
conda install -y ipykernel
python -m ipykernel install --user --name myenv

答案 1 :(得分:0)

Try installing nb_conda in your environment, by going to your command line conda activate your environment and conda install nb_conda. Make sure you also have ipykernel installed in your environment, then deactivate and reactivate your environment and try again.