Setting up a local azure ML env

Assuming you have conda set up for your environments , Start out by listing all of the conda environments

conda info --envs

Lets assume you want to create a new environment with a specific version of python

conda create -n azuremlenv python=3.7.7

This will download the required packages and install it

Collecting package metadata (current_repodata.json): done …

the next step is to create a new environment

conda activate azuremlenv

replace the azuemlenv with your environment name in the above statement

install notebook and ipykernel packages

conda install notebook ipykernel

The next set of packages will download the azureml-sdk

pip install azureml-sdk[notebooks, automl]

The last step is to install a kernel so that the environment comes up in the jupyter notebook

python -m ipykernel install --user --name azuremlenv --display-name "azuremlenv"

or 

conda install nb_conda_kernels

the nb_conda kernels will allow conda kernels to be recognized in jupyter

once you bring up the jupyter notebook , you will see the dropdown with the corresponding ml environment that you can use the as the kernel for the notebook . the above command creates a new json file with that looks like below.

to bring up the notebook , you just need to type in jupyter notebook on the command line

if the kernel list does not show the conda env that you just installed , then type in

python -m ipykernel install --user nameofcondaenv --display-name "nameofcondaenv"

restart the notebook and the new kernel should appear in the dropdown under kernel -> change kernel section

happy coding !