Who is this for?
This tutorial is for users who want to generate an Anaconda Navigator app from a given recipe. Prior knowledge of or conda recipes is recommended.Prerequisites
Any application you intend to launch from Anaconda Navigator should include a Graphical User Interface (GUI) component. Not all conda packages have graphical interfaces.
- Install Miniconda or Anaconda.
-
If you installed Miniconda, you also need to install the
conda-build
,anaconda-client
, andanaconda-navigator
packages. Open an Anaconda Prompt (Terminal for macOS/Linux users) and run the following commands: -
If necessary, Create an account on Anaconda.org.
Your Anaconda.org username is the same as your Anaconda.org channel name.
Using a recipe
-
Make a new directory called myapp and then change to the new directory:
-
Create the recipe by opening a text file and naming it
meta.yaml
. - For this tutorial, we will use the jupyterlab recipe yaml from the jupyterlab feedstock as a base.
Because JupyterLab is already an application in Navigator, you must change the
name:
parameter in the example jupyterlab meta.yaml
to make sure that the app appears properly in Navigator.App parameter in meta.yaml
The app:
parameter in the meta.yaml
file declares a conda package to be an app. The app parameter can contain four keys: entry
, summary
, icon
, and type
.
entry
: The command required to run the packageicon
: (Optional) The path to an image you want to appear on your app’s tile in Navigator.summary
: A short description of the app.type
: The application type, such asdesk
for desktop application orweb
for a web application.
Build
Now that you have theconda-build
recipe ready, you can use the conda-build
tool to create the package.
You must build and upload your app separately on Windows, macOS, and Linux machines in order for the package to be available on all platforms.
-
Navigate to your
myapp
directory by running the following command: -
Build your application by running the following command:
-
When conda-build is finished, it displays the exact path and filename of the conda package. See the Troubleshooting section if the conda-build command fails.
The path and filename will vary depending on your installation and operating system. For example:
- Save the path and filename information for the upload step.
Upload to Anaconda.org
Now you can upload the new local packages to Anaconda.org.-
First, log in to Anaconda.org from your terminal by running the following command:
-
Provide your Anaconda.org username and password. If the login is successful, you will see output similar to the following:
The following step must be done in the
base
. To return to your base environment, run the following command: -
Now that you are logged into your channel, you can upload the JupyterLab package. Choose a command that works for your operating system:
Change your username, path, and filename to the exact username, path, and filename you saved when you built the application. These will vary depending on your installation and operating system.
Configure Anaconda Navigator
Now that the JupyterLab package has been uploaded to your Anaconda.org channel, you can add the channel to Anaconda Navigator.-
Open Anaconda Navigator.
From the Start menu, search for “Anaconda Navigator” and click to open.
-
To add your , click Channels, then Add. Enter the URL to your Anaconda.org channel:
https://conda.anaconda.org/{CHANNEL}
, replacing{CHANNEL}
with your Anaconda.org username. -
Press Enter (Windows)/Return (Mac) and click Update Channels.
- Close and restart Anaconda Navigator. Your app will be displayed on the Home page.
Troubleshooting
My app isn’t appearing on the Home page
- Check that the conda package has been uploaded to your Anaconda.org channel.
- Check that your channel has been added to the Channels list.
- Remove the
.anaconda/navigator
folder from your home directory to reset Navigator’s configuration information, then restart Navigator.
My app isn’t launching
-
If the application does not launch after installation, confirm that it works via the command line by running the following command:
If you are not using the example feedstock, the command after
run
will be theentry:
command you have designated. -
If JupyterLab starts correctly with conda, remove the
.anaconda/navigator
folder from your home directory to reset the Navigator configuration information and enable the app to launch correctly from the Navigator application. Then, restart Navigator.