Adding Private Python Packages

This documentation is for Dash Enterprise.
Dash Enterprise is the fastest way to write & deploy Dash apps and
Jupyter notebooks.
10% of the Fortune 500 uses Dash Enterprise to productionize AI and
data science apps. Find out if your company is using Dash Enterprise.

This page applies to Dash Enterprise 5. If your organization uses Dash Enterprise 4, view information about private packages at https://<your-dash-enterprise-server>/Docs/dash-enterprise/private-packages.

When you provide your Dash app’s Python dependencies in a requirements.txt file, your app looks for
the packages on by default. This guide can help you customize this behavior when your app
depends on a package that is not available on

See also: Handling dependencies when Dash Enterprise is internet-restricted.

There are two common approaches: Using a private Python package index provided by your organization or
including the Python packages directly in your app’s files.

Using a Private Python Package Index

If your organization manages a private Python package index, you can set it as an extra index that your app checks
when installing dependencies.

To install a package from a private Python package index:

  1. At the top of requirements.txt, add the following line:
    txt --extra-index-url <private-package-index> --trusted-host <private-package-index>
    where <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.

  2. List the package name in requirements.txt on its own line the same way you would for a public package. For example:
    txt my-private-package

Your app continues to look for packages on, but it now also looks in your private Python package index for any
packages it can’t find on

Including the Package in Your App Files

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
-- 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 requirements.txt with:


Important: If your package depends on other packages that are not available on, 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 packages. Your
requirements.txt would then look like: