简体   繁体   中英

Jupyter Notebook kernel not upgrading

I currently use python 3.7.4. I am trying to upgrade to python 3.8 by using a new environment. The following steps were executed in Anaconda prompt:

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". In the top right corner within Jupyter notebook, the kernel shows "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.

Launch a notebook with jupyter notebook in your activate conda environment in this case py38.

Then create a new notebook and you can select the environment you want in this case py38.

After you have done this try running:

import sys
print(sys.version)

and see the output.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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