Building Anaconda Navigator Applications - Anaconda Documentation
Building Anaconda Navigator Applications - Anaconda Documentation
(../../../../)
applications
Who is this for?
Before you start
Using a recipe
Build architecture
App entry in meta.yaml
Build
Upload to Anaconda Cloud
Configure Anaconda Navigator
Troubleshooting
Additional Information
i Note
Applications to be built for Anaconda Navigator should have a graphical user interface. Not all
conda packages have graphical interfaces.
It is recommended that you use the latest versions of conda and conda-build. To upgrade both
packages run:
Using a recipe
First, make a new directory called jupyterlab and then change to the new directory:
mkdir jupyterlab
cd jupyterlab
Create the recipe by opening a text file and name it meta.yaml. Copy the recipe from the feedstock
(https://github.com/anacondarecipes/jupyterlab-feedstock/blob/master/recipe/meta.yaml):
package:
name: jupyterlab
version: {{ version }}
source:
fn: jupyterlab-{{ version }}.tar.gz
url: https://pypi.io/packages/source/j/jupyterlab/jupyterlab-{{ version }}
sha256: {{ sha256 }}
build:
noarch: python
number: 0
script: {{ PYTHON }} -m pip install --install-option="--skip-npm" . -vv
entry_points:
- jupyter-lab = jupyterlab.labapp:main
- jupyter-labextension = jupyterlab.labextensions:main
- jupyter-labhub = jupyterlab.labhubapp:main
- jlpm = jupyterlab.jlpmapp:main
app:
entry: jupyter lab
icon: icon.png
summary: JupyterLab PRE-ALPHA
type: desk
Build architecture
The recipe, as given, is a noarch recipe. This is not compatible with older versions of Navigator.
Under the build section, remove noarch: python .
Launch script
For macOS, a launch script must also be provided. In a text editor, create a new file in the conda-
build recipe directory called jupyterlab_mac.command. The contents of this file are:
DIR=$(dirname $0)
$DIR/jupyter-lab ${HOME}
Build.sh script
To make sure that the file gets installed, create a new file in the same directory as the meta.yaml.
Title it build.sh and add these lines to the build.sh script:
then
cp $RECIPE_DIR/jupyterlab_mac.command $PREFIX/bin
fi
Remove the script key under the build section in the meta.yaml.
Build.bat
Create a new file called build.bat. Include the following:
Entry key
Then in the meta.yaml, add this line to the app section:
The completed app section should look like this:
i Note
Build
Now that you have the conda-build recipe ready, you can use the conda-build tool to create the
package. You will have to build and upload the JupyterLab package separately on Windows, macOS,
and Linux machines in order for the package to be available on all platforms. If you’re already in the
JupyterLab directory, you can type conda build . in your terminal. Otherwise type conda-build
jupyterlab .
When conda-build is finished, it displays the exact path and filename of the conda package. See the
Troubleshooting (https://docs.conda.io/projects/conda-build/en/latest/user-guide/tutorials/build-pkgs-
skeleton.html#troubleshooting) section if the conda-build command fails.
v: latest
Windows example file path: C:\Users\username\miniconda\conda-bld\win-64\jupyterlab-
1.2.4-py38_0.tar.bz2
macOS example file path: /Users/username/anaconda3/conda-bld/osx-64/jupyterlab-1.2.4-
py38_0.tar.bz2
i Note
The path and filename will vary depending on your installation and operating system.
Save the path and filename information for the next step.
i Note
Now that you are logged into your channel, you can upload the JupyterLab conda package as
follows:
Windows users: anaconda upload C:\Users\username\miniconda\conda-bld\win-
64\jupyterlab-1.2.4-py38_0.tar.bz2
i Note
Change your username, path, and filename to the exact username, path, and filename you saved
in Step 2. These will vary depending on your installation and operating system.
For more information about Anaconda Cloud, see the Anaconda Cloud documentation
(https://docs.anaconda.com/anaconda-cloud) page.
3. To add your channel, first click the Channel button. Second, click the Add button. Third, type in the
v: latest
URL to your Anaconda Cloud channel: https://conda.anaconda.org/channel
(https://conda.anaconda.org/channel)
i Note
(../../../../_images/add-channel.png)
5. Close and restart Anaconda Navigator. The JupyterLab app will be displayed on the Home pane.
Troubleshooting
A. Conda-build fails
If the conda recipe fails to build consult the Troubleshooting (https://docs.conda.io/projects/conda-
build/en/latest/user-guide/tutorials/build-pkgs-skeleton.html#troubleshooting) guide.
Additional Information
v: latest
For more information about adding Start Menu entries in Windows, see the menuinst
(https://github.com/ContinuumIO/menuinst) documentation.
« Managing channels (../manage-channels/)
v: latest