Blog Post

Educator Developer Blog
1 MIN READ

Installing Python Packages to Azure Notebooks

Lee_Stott's avatar
Lee_Stott
Icon for Microsoft rankMicrosoft
Mar 21, 2019
First published on MSDN on Sep 20, 2017


One of the key questions we get from academic around the use of Azure Notebooks http://notebooks.azure.com is that its critical that we know whether specific python packages can be made available to students.

The easy answer is yes and there are actually a couple of options for academics, so that you can ensure packages are available within your academic notebooks:

1. You can install them yourself within your notebook using the command "!pip install" in most cases just simply remember the ! command.



2. You can drop into the Terminal and install packages from the bash shell, via pip, conda, etc as you would do on your personal machine. see https://notebooks.azure.com/help If you do this in the library directory into a virtual environment, the installed bits will be there when students Clone that library - they have to activate that environment to use it.





3. There is now a "start-up" script called aznbsetup.sh that runs each time a container is started.   whatever pip, wget, etc. commands you put there will be run upon start-up of the notebook.  note that each container starts fresh.



For more details please see http://notebooks.azure.com HELP section
Updated Mar 21, 2019
Version 2.0
No CommentsBe the first to comment