This is a quick guide for installing packages using Jupyterlab's terminal on Kyso.
The Docker Image that runs each time you open up a workspace on Kyso has all of the standard tools you need for doing data science and machine learning with python.
However, sometimes you need packages that are not pre-installed. And we have noticed that quite a few of our users are not aware that they have access to a terminal inside the Jupyterlab environment, from which you can manually install the tools you need.
We recently updated Kyso's default virtual environment to Jupyterlab, the next-generation UI for Project Jupyter.
There are two ways you can open up your terminal fro Jupyterlab.
From the file browser on the left-hand side, click on the '+' sign, which opens the Launcher tab. From there, click on the 'Terminal' button under 'Other'.
From the navbar at the top, go to 'File' > 'New' > 'Terminal'.
All of our pre-installed libraries are installed using the pip3 command - running pip on Kyso defaults to pip3.
Folium makes it easy to visualize data that’s been manipulated in Python on an interactive Leaflet map. You can manipulate your data in Python, then visualize it in on a Leaflet map via Folium.
Folium, however, is not a pre-installed package on our Docker image.
So, I navigate to the terminal & type in the following command:
Now I can work away on my data & create an interactive map! I've grabbed a small dataset from https://github.com/Eleonore9/ebola_outbreaks, which visualizes instances of the Ebola outbreak beginning in 2014.
While the above method is indeed handy if you are just prototyping, or will be publishing the notebook that same day. However, if you are installing a package that you'll be working with regularly, the packages in question will need to be manually installed from the terminal each time you open a workspace. This would be particularly annoying if you're working with multiple packages that aren't on the default image.
You can create a text file called
which will install everything in one go.
Please know that the team here at Kyso are more than happy to install any package you'll be working with regularly - feel free to reach out to us at firstname.lastname@example.org
Pretty soon you guys will be able to create your own custom Docker images on Kyso. So no more manual installation - simply specify the packages and libraries you'll need when you open the workspace and that'll be the docker image that runs each time you open the workspace. We'll be sending out an update to all of our users when this is implemented, so keep an eye out!