I got an error that the kernel could not be found in Azure ml.

kk 1 Reputation point
2022-01-25T07:35:38.537+00:00

When I was using a compute instance with azure ml, I got the following message:
168157-kernelerror.png
The kernel for python 3.8 azure ml was not available.
Please tell me the cause and solution.
The instance I was using is:
Virtual machine size
Standard_DS11_v2 (2 cores, 14 GB RAM, 28 GB disk)

Azure Machine Learning
Azure Machine Learning
An Azure machine learning service for building and deploying models.
2,554 questions
{count} votes

1 answer

Sort by: Most helpful
  1. romungi-MSFT 41,861 Reputation points Microsoft Employee
    2022-01-25T12:23:23.78+00:00

    @kk Yes, by default the python 3.8 version of kernel is not available on Azure ML notebooks. You can however create your custom kernel and use it from the dropdown for any your notebooks by following some simple steps:

    • Use the terminal of your compute by clicking the open terminal option.

    168257-image.png

    • Run the following commands on the terminal using conda to create a python 3.8 environment and creating a kernel which can be used with your notebook. conda create -n py38 python=3.8
      conda activate py38 conda install pip
      conda install ipykernel
      python -m ipykernel install --user --name python38 --display-name "Python 38"
    • Stop and start your compute instance and load the drop down to see the new kernel. Stopping and starting the kernel is available from the notebook screen as seen in the first screen shot

    168286-image.png

    • Print the version in a cell to confirm if the desired kernel or python version is picked up.

    168287-image.png

    If an answer is helpful, please click on 130616-image.png or upvote 130671-image.png which might help other community members reading this thread.

    1 person found this answer helpful.