This documentation is for Dash Enterprise.
Dash Enterprise is the fastest way to write & deploy Dash apps and
10% of the Fortune 500 uses Dash Enterprise to productionize AI and
data science apps. Find out if your company is using Dash Enterprise.
When you provide your app’s Python dependencies in a
requirements.txt file, your app looks for
the packages on PyPI.org by default. This guide can help you customize this behavior when your app
depends on a package that is not available on PyPI.org, or when your organization does not allow fetching packages from PyPI.org.
See also: Handling dependencies when Dash Enterprise is internet-restricted.
There are two common approaches: Including the Python packages directly in your app’s files or using a private Python package index provided by your organization. If your administrator
has configured a private Python package index at the system level,
then no action is needed for your apps to fetch packages from it.
By placing the package
tar.gz (tarball) or
.whl (wheel) file directly in your app’s code, your app can install the package using this file.
Here’s an example where a tarball is placed at the root of the app:
-- .gitignore -- app.py -- Procfile -- requirements.txt -- myPackage.tar.gz
Make sure the
requirements.txt entry matches the name of the file you added, including the extension. In the example above, you would list the package in
Important: If your package depends on other packages that are not available on PyPI.org, you’ll need to add them to your app as well.
If you’re including a lot of packages in your app, you may want to organize them in a directory like
requirements.txt would then look like:
packages/myPackageA.tar.gz packages/myPackageB.tar.gz packages/myPackageC.tar.gz
If your organization manages a private Python package index, you can set it as an extra index that your app checks
when installing dependencies.
Important: Dash Enterprise requires that the private Python package index have a TLS/SSL certificate from a globally trusted certificate authority (CA).
To install a package from a private Python package index:
At the top of
requirements.txt, add the following line:
--extra-index-url <private-package-index> --trusted-host <private-package-index>
<private-package-index> is the URL to your organization’s private Python package index. You can omit the
--trusted-host flag if the index uses HTTPS.
List the package name in
requirements.txt on its own line the same way you would for a public package. For example:
Your app continues to look for packages on PyPI.org, but it now also looks in your private Python package index for any
packages it can’t find on PyPI.org.
If you are an administrator with access to the KOTS Admin Console, you can set an
PIP_EXTRA_INDEX_URL environment variable that will be applied to all apps and workspaces on Dash Enterprise.
To configure a private Python package index at the system level:
Go to the KOTS Admin Console at (
Enter the password that was stored as part of your Dash Enterprise installation.
Go to the Config tab.
In PIP_EXTRA_INDEX_URL, enter the URL of your private Python package index.
Once the config is saved, a confirmation message appears.
In the confirmation message, select Go to updated version. You are taken to the version history.
Next to the available version labelled Config change, select Deploy to apply the change to Dash Enterprise.
Apps and workspaces created on Dash Enterprise after this change will automatically pick up the private Python package index via the
PIP_EXTRA_INDEX_URL environment variable.
To apply this change to existing apps and workspaces, redeploy the apps and rebuild or recreate the workspaces.