Conda Environment and Jupyter Notebook, Python 3.9.2



我的Conda环境没有显示在我的Jupiter笔记本中。我已经查看了这里所有的(优秀的)对话框,但它似乎不适合python 3.9.2。

我尝试了以下操作,但没有成功:

conda install jupyter
conda install ipykernel
conda install nb_conda

然后当我尝试以下conda install nb_conda_kernels时,我得到以下错误:

Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: | 
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed                                                                                                                                                                                                      
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- nb_conda_kernels -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0|>=3.8,<3.9.0a0']
Your python: python=3.9
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

如何让我的conda环境显示在python 3.9.2的jupyter笔记本中?谢谢你!

尝试使用conda-forge通道,例如:

$ conda install -c conda-forge ipykernel

如果这个conda环境只是一个内核,你不需要安装jupyter,如果这是你想要做的。

之后,您需要在conda环境中运行此命令:

$ python -m ipykernel install --user --name vanilla --display-name "Python 3 (vanilla)"

根据您的喜好替换名称和display-name

最新更新