How to build Anaconda virtual environment used in Azure Machine Learning and link with Jupyter

Introduction

Build a machine learning environment using Jupyter notebooks on Azure Machine Learning It is a summary of the methods for.

It is assumed that Azure Machine Learning Studio and Jupyter notebooks can be started. Use Anaconda to build and switch virtual environments.

What is Anaconda?

A collection of Python packages for data science --Supports over 1,500 packages --Supports both GUI and command line --Can be operated using the conda command

By using Anaconda, it is possible to easily build and switch the development environment without taking time to install the library.

Reference: https://www.creativevillage.ne.jp/72837

procedure

1. Launch Terminal on jupyter notebooks

image.png

2. Anaconda virtual environment setup and Jupyter integration

Follow the steps below in Terminal on Jupyter.

2.1 Building a virtual environment with conda

$ conda create --name my_notebook_env python=3.7 -y

-name my_notebook_env: The name of the virtual environment. You can set whatever you like. python = 3.7: Python version used in the virtual environment -y: Automatically respond to confirmation items with yes

2.2 Enabling the virtual environment

$ conda activate my_notebook_env

2.3 Installing libraries in a virtual environment

Install the Azure Machine Learning SDK for Python.

$ pip install --upgrade azureml-sdk[explain,automl,interpret,notebooks]

See below for details on the installed components. Azure Machine Learning SDK for Python

2.4 Adding a virtual environment kernel to Jupyter

Execute the following command with the virtual environment activated.

$ ipython kernel install --user --name=my_notebook_env --display-name=my_notebook_env

--user: Installed in the current user environment --name: Specify the name of the kernel --display-name: The display name of the kernel. This time, it is the same as the kernel name, but you can set an easy-to-understand display name here.

3. Kernel switching on Jupyter notebooks

3.1 Jupyter reload

In order to reflect the change, if there is an open node book, reload it by reloading the browser.

3.2 Kernel switching

Select Kernel → Change kernel on the node book, and select the virtual environment (my_notebook_env) created this time. image.png

It is successful if the display on the upper right of the node book screen is switched correctly. image.png

Summary

You can easily build and switch the development environment by using Anaconda. By using Azure Machine Learning, you can perform machine learning in the familiar Jupyter environment.

reference

What is Azure Machine Learning Azure Machine Learning SDK for Python Easy usage memo of Anaconda (conda)

Recommended Posts

How to build Anaconda virtual environment used in Azure Machine Learning and link with Jupyter
How to build Python and Jupyter execution environment with VS Code
How to quickly create a machine learning environment using Jupyter Notebook with UbuntuServer 16.04 LTS with anaconda
How to quickly create a machine learning environment using Jupyter Notebook on macOS Sierra with anaconda
How to quickly create a machine learning environment using Jupyter Notebook with UbuntuServer 16.04 LTS
Machine learning with Jupyter Notebook in OCI Always Free environment (2019/12/17)
Build a machine learning scikit-learn environment with VirtualBox and Ubuntu
How to interactively draw a machine learning pipeline with scikit-learn and save it in HTML
How about Anaconda for building a machine learning environment in Python?
How to build a Python virtual execution environment using Visual Studio Code and pipenv on a Windows machine (also Jupyter notebook)
Build AI / machine learning environment with Python
How about creating a virtual environment with Anaconda and doing pip install?
Unable to import packages installed in virtual environment with Anaconda on Windows 10
[Memo] Build a virtual environment with Pyenv + anaconda
Build a virtual environment with pyenv and venv
[TF] How to build Tensorflow in Proxy environment
From Python environment construction to virtual environment construction with anaconda
Error running Jupyter Notebook in Anaconda virtual environment
Build a Python machine learning environment with a container
Build a PYNQ environment on Ultra96 V2 and log in to Jupyter Notebook
How to install the deep learning framework Tensorflow 1.0 in the Anaconda environment of Windows
Build an interactive environment for machine learning in Python
Build a python virtual environment with virtualenv and virtualenvwrapper
Build a machine learning application development environment with Python
Build a python virtual environment with virtualenv and virtualenvwrapper
How to resolve SSL module errors in Anaconda environment
How to use jupyter lab in Windows 10 local environment
How to deal with Executing transaction: failed in Anaconda
How to set up a Google Colab environment with Coursera's advanced machine learning courses
How to split machine learning training data into objective variables and others in Pandas
You don't need to install Anaconda to build a machine learning environment. Let's use Miniconda
[Learning memo] How to make an application with Django ~ From virtual environment to pushing to github ~
I tried to build an environment for machine learning with Python (Mac OS X)
How to adapt multiple machine learning libraries in one shot
[TensorFlow 2 / Keras] How to run learning with CTC Loss in Keras
How to build a new python virtual environment on Ubuntu
Build Azure Pipelies with Azure DevOps in a Linux self-hosted environment
Build an Anaconda virtual environment
Reflect the virtual environment created with Miniconda in Jupyter notebook
Double-click ipynb in windows + anaconda environment to open with jupyter-notebook
A note on how to load a virtual environment in PyCharm
How to develop in a virtual environment of Python [Memo]
I want to use a virtual environment with jupyter notebook!
Build a machine learning environment
How to build a python2.7 series development environment with Vagrant
Used in machine learning EDA
Machine learning to learn with Nogizaka46 and Keyakizaka46 Part 1 Introduction
Switch virtual environment with jupyter
How to create dataframes and mess with elements in pandas
How to log in to AtCoder with Python and submit automatically
Overview of Python virtual environment and how to create it
Learning history to participate in team application development with Python ~ Build Docker / Django / Nginx / MariaDB environment ~
How to build a LAMP environment using Vagrant and VirtulBox Note
How to deal with python installation error in pyenv (BUILD FAILED)
Build a Python environment on your Mac with Anaconda and PyCharm
How to run Jupyter and Spark on Mac with minimal settings
How to use jupyter notebook without polluting your environment with Docker
Create an arbitrary machine learning environment with GCP + Docker + Jupyter Lab
Learn machine learning anytime, anywhere in an on-demand Jupyter Notebook environment
People memorize learned knowledge in the brain, how to memorize learned knowledge in machine learning
How to create a serverless machine learning API with AWS Lambda