Although you can configure the environment for your notebook on the project level, you may want to install packages directly within an individual notebook.
Packages installed from the notebook apply only to the current server session. Package installations aren't persisted once the server is shut down.
Now we have the full background to answer our question: Why don't!pip install or!conda install always work from the notebook? The root of the issue is this: the shell environment is determined when the Jupyter notebook is launched, while the Python executable is determined by the kernel, and the two do not necessarily match. Now we have the full background to answer our question: Why don't!pip install or!conda install always work from the notebook? The root of the issue is this: the shell environment is determined when the Jupyter notebook is launched, while the Python executable is determined by the kernel, and the two do not necessarily match.
Python
Packages in Python can be installed using either pip or conda using commands within code cells:
If the command output indicates that the requirement is already satisfied, then Azure Notebooks may include the package by default. The package might also be installed through a project environment setup step.
R
Packages in R can be installed from CRAN or GitHub using the install.packages
function in a code cell:
You can also install prerelease versions and other development packages from GitHub using the devtools library:
F#
Packages in F# can be installed from nuget.org by calling the Paket dependency manager from within code cells. First, load the Paket manager:
Then install packages: