Go back

JupyterHub User Guide: User Management and New Packages installation

This section explains you how to use JupyterHub for providing multiuser environment and installing new packages.

  1. This VM comes with the default ubuntu as an admin user. However you can add more users with the benefit of each user getting their own notebook server and workspace, ensuring they don’t interfere with each other’s code, files, or environment.

For more details on how to add new users please refer to Setting up Multiuser Jupyter Enviroment Page.

  1. To install additional packages using jupyter notebook, Login with ubuntu user and provide the password of ubuntu user.

/img/azure/crewai-vm/jupyter-login.png

  • Note: If for some reason you get spawn failed error after login as shown below, then Click on Home tab at top left and click on Start My Server Button.

/img/azure/crewai-vm/jupyter-spawn-error.png

/img/azure/crewai-vm/start-my-server.png

  1. Open Jupyter Notebook or Console and enter the below command to install any package. e.g matplotlib package using pip3. This VM has preconfigured python virtual environment located at /home/ubuntu/setup/jupyter-venv. New packages will get installed at /home/ubuntu/setup/jupyter-venv/lib/python3.12/site-packages directory by default.
! pip3 install packagename

/img/azure/crewai-vm/jupyterlab.png

/img/azure/crewai-vm/install-new-packages-in-notebook.png

/img/azure/crewai-vm/install-new-packages-from-jupyter-console.png

  1. The package matplotlib is now available to all the users in the JupyterHub. If a user already had a python notebook running, they have to restart their notebook’s kernel to make the new libraries available.

  2. Alternatively, you can open the terminal from JupyterLab and install the package using same pip3 command. If you are installing new packages using the jupyterlab terminal, then there is no need to activate the virtual environment as jupyter is running inside the virtual environment.

pip3 install packagename

/img/azure/crewai-vm/open-jupyter-terminal.png

/img/azure/crewai-vm/install-new-packages-from-jupyter-terminal.png

  1. You can also install new packages using pip3 command in SSH Terminal as follows.

Connect via SSH terminal. Activate the virtual environment using -

source /home/ubuntu/setup/jupyter-venv/bin/activate.fish

You can see the virtual environment is now active. Install the new packages using

pip3 install packagename

/img/azure/crewai-vm/install-new-packages-from-terminal.png

  1. All the packages installed using pip3 are available under /home/ubuntu/setup/jupyter-venv/lib/python3.12/site-packages directory.

/img/azure/crewai-vm/default-package-location.png

To get started with CrewAI Platrorm please visit CrewAI Quickstart Guide

To run your Crews using GUI please visit CrewAI Studio Quickstart

For more details, please visit Official Documentation page

Go back