# Running Older Versions of JupyterLab

## Why Run an Older Version of JupyterLab?

The primary reason to run an older version of JupyterLab is to access snapshots containing tools that cannot be run in the current version's execution environment.

## Launching an Older Version via the User Interface (UI)

1. From the main Platform menu, select **Tools**, then **Tools Library**.
2. Find and select, from the list of tools, either **JupyterLab with Python, R, Stata, ML, Image Processing** or **JupyterLab with Spark Cluster**.
3. From the tool detail page, click on the **Versions** tab.
4. Select the version you'd like to run. Click the **Run** button.

## Launching an Older Version via the Command-Line Interface (CLI)

1. Select the project in which you want to run JupyterLab.
2. Launch the version of JupyterLab you want to run, substituting the version number for `x.y.z` in the following commands:
   * For JupyterLab without the Spark cluster capability, run the command `dx run app-dxjupyterlab/x.y.z --priority high`.
   * For JupyterLab with the Spark cluster capability, run the command `dx run app-dxjupyterlab_spark_cluster/x.y.z --priority high`

{% hint style="info" %}
Running JupyterLab at "high" priority is not required. However, doing so ensures that your interactive session is not interrupted by spot instance termination.
{% endhint %}

## Accessing JupyterLab

After launching JupyterLab, access the JupyterLab environment using your browser. To do this:

1. Get the job ID for the job created when you launched JupyterLab. See the [Monitoring Executions page](https://documentation.dnanexus.com/running-apps-and-workflows/monitoring-executions#getting-detailed-information-on-an-execution-via-the-ui) for details on how to get the job ID, via either the UI or the CLI.
2. Open the URL `https://job-xxxx.dnanexus.cloud`, substituting the job's ID for `job-xxxx`.
3. You may see an error message "502 Bad Gateway" if JupyterLab is not yet accessible. If this happens, wait a few minutes, then try again.
