How to install a package not on PyPI/Conda but available on GitHub
Are you trying to deploy your app to Streamlit Community Cloud, but don't know how to specify a Python dependency in your requirements file that is available on a public GitHub repo but not any package index like PyPI or Conda? If so, continue reading to find out how!
Let's suppose you want to install
SomePackage and its Python dependencies from GitHub, a hosting service for the popular version control system (VCS) Git. And suppose
SomePackage is found at the the following URL:
requirements.txt) supports installing from GitHub. This support requires a working executable to be available (for Git). It is used through a URL prefix:
Specify the GitHub web URL
SomePackage, innclude the following in your
You can even specify a "git ref" such as branch name, a commit hash or a tag name, as shown in the examples below.
Specify a Git branch name
SomePackage by specifying a branch name such as
develop, etc, in
Specify a commit hash
SomePackage by specifying a commit hash in
Specify a tag
SomePackage by specifying a tag in
It is currently not possible to install private packages from private GitHub repos using the URI form:
version is a tag, a branch, or a commit. And
token is a personal access token with read only permissions. Streamlit Community Cloud only supports installing public packages from public GitHub repos.
Still have questions?
Our forums are full of helpful information and Streamlit experts.