Jupyter Notebook and JupyterLab are popular integrated development environments (IDEs) widely used by data scientists, researchers, and educators. The editors allow users to write and execute code directly from a web browser, making it an excellent tool for data analysis, scientific computing, and machine learning. Currently, this integration is only available for ActiveState Python projects.
Instructions are provided for
The following method of integrating a single runtime with the Jupyter Notebook/JupyterLab is available for Windows, macOS, and Linux.
Before you begin make sure the following requirements have been met
ipykernel
jupyter
jupyterlab
To launch your editor using your ActiveState runtime as the default interpreter
state checkout <orgname>/<projectname>
activestate.yaml
filestate shell
to open a secure shell virtual environment for the projectjupyter notebook
to open a Jupyter Notebook instance, orjupyter lab
to open a JupyterLab instanceAfter your Jupyter instance automatically launches in your browser, your ActiveState runtime will be pre-selected as the default interpreter.
To verify that your ActiveState runtime (or “kernel”) has been successfully integrated into your Jupyter Notebook instance, click on the New dropdown and your ActiveState runtime should be visible, seen below as “Python 3 (ipykernal)”.
Your ActiveState runtimes will be visible on the Launcher tab.
The following method uses the AS-Notebook
tool to sync all existing ActiveState runtimes that have been checked out locally into Jupyter Notebook. Currently, this method is only available to macOS and Linux users.
Before you begin make sure the following requirements have been met
ipykernal
jupyter
jupyterlab
In your terminal use the following command to check out the ActiveState Platform project AS-Notebook
in your local working directory (the project includes a Python runtime as well as a copy of Jupyter Notebook).
state checkout ActiveStateSE/AS-Notebook
This will create a new AS-Notebook
folder with the necessary files to complete your sync.
Go into the newly created AS-Notebook
folder and run
state run syncAgent
This will make all State Tool projects that support Jupyter Notebook visible to any local instance of the IDE. After the script has been completed, you will receive a confirmation message stating ActiveState Runtimes In Synch With Jupyter
.
To start a local instance of Jupyter Notebook enter
state exec jupyter notebook
To verify that your ActiveState runtime (or “kernel”) has been successfully integrated into your Jupyter Notebook instance, click on the New dropdown and your synched ActiveState runtimes should be visible (seen below).
If your browser fails to launch after running the jupyter notebook
or jupyter lab
command
When starting a Jupyter Notebook instance, note that the default python3 ipykernel will be duplicated with the name of the actual runtime (in this case “ActiveStateSE/AS-Notebook-/home/andrewd-activestate/AS-Notebook”).