简体   繁体   English

Jupyter Notebook kernel 未升级

[英]Jupyter Notebook kernel not upgrading

I currently use python 3.7.4.我目前使用 python 3.7.4。 I am trying to upgrade to python 3.8 by using a new environment.我正在尝试使用新环境升级到 python 3.8。 The following steps were executed in Anaconda prompt:在 Anaconda 提示符下执行了以下步骤:

conda install ipykernel
conda create -n py38 python=3.8
Activate py38
pip install ipykernel
python -m ipykernel install --name py38

Then, I restarted Anaconda, and ran "jupyter notebook".然后,我重新启动 Anaconda,然后运行“jupyter notebook”。 In the top right corner within Jupyter notebook, the kernel shows "py38".在 Jupyter 笔记本的右上角,kernel 显示“py38”。 However, when running the following code:但是,在运行以下代码时:

import sys
print(sys.version)

It returns:它返回:

3.7.4 (default, Aug  9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]

Run conda install nb_conda from the anaconda prompt in your py38 environment.在 py38 环境中,从 anaconda 提示符运行conda install nb_conda

Launch a notebook with jupyter notebook in your activate conda environment in this case py38.在本例 py38 中,在您的激活 conda 环境中启动一个带有jupyter notebook的笔记本。

Then create a new notebook and you can select the environment you want in this case py38.然后创建一个新的笔记本,你可以 select 你想要的环境在这种情况下 py38.

After you have done this try running:完成此操作后,尝试运行:

import sys
print(sys.version)

and see the output.并查看 output。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM