From 3fd882480622669063558cce8e8942005cc4a1a7 Mon Sep 17 00:00:00 2001 From: Mendon Kissling <59585235+mendonk@users.noreply.github.com> Date: Thu, 10 Jul 2025 11:57:05 -0400 Subject: [PATCH] docs: how to add a missing dependency to langflow desktop (#8942) * add-package-management-for-lf-desktop * username * Apply suggestions from code review Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com> * combine-oss-dependency-management --------- Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com> --- .../Develop/install-custom-dependencies.md | 35 +++++++++++++------ .../Get-Started/get-started-installation.md | 4 +++ docs/docs/Support/troubleshooting.md | 6 ++++ 3 files changed, 34 insertions(+), 11 deletions(-) diff --git a/docs/docs/Develop/install-custom-dependencies.md b/docs/docs/Develop/install-custom-dependencies.md index e838108f7..7eaf3caed 100644 --- a/docs/docs/Develop/install-custom-dependencies.md +++ b/docs/docs/Develop/install-custom-dependencies.md @@ -5,7 +5,30 @@ slug: /install-custom-dependencies Langflow provides optional dependency groups and support for custom dependencies to extend Langflow functionality. -## Install optional dependency groups +## Install custom dependencies in Langflow Desktop {#langflow-desktop} + +To add dependencies to Langflow Desktop, add an entry for the package to the application's `requirements.txt` file: + + * On macOS, the file is located at `/Users/USER/.langflow/data/requirements.txt`. + * On Windows, the file is located at `C:\Users\USER\AppData\Roaming\com.Langflow\data\requirements.txt`. + +Add the dependency and version to `requirements.txt` on separate lines in the format `PACKAGE==VERSION`, such as `docling==2.40.0`. + +Restart Langflow Desktop to install the dependencies. + +If you need to change or uninstall custom dependencies. edit the `requirements.txt` file, and then restart Langflow Desktop. + +## Install custom dependencies in Langflow OSS + +To install your own custom dependencies in your Langflow environment, add them with your package manager. + +If you're working within a cloned Langflow repository, add dependencies with `uv add` because there is already a `pyproject.toml` file for uv to reference: + +```bash +uv add langflow DEPENDENCY +``` + +### Install optional dependency groups Langflow OSS provides optional dependency groups that extend its functionality. @@ -23,16 +46,6 @@ To install multiple extras, use commas to separate each dependency group: uv pip install "langflow[deploy,local,postgresql]" ``` -## Install custom dependencies - -To install your own custom dependencies in your Langflow environment, add them with your package manager. - -If you're working within a cloned Langflow repository, add dependencies with `uv add` because there is already a `pyproject.toml` file for uv to reference: - -```bash -uv add langflow DEPENDENCY -``` - ### Use a virtual environment to test custom dependencies When testing locally, use a virtual environment to isolate your dependencies and prevent conflicts with other Python projects. diff --git a/docs/docs/Get-Started/get-started-installation.md b/docs/docs/Get-Started/get-started-installation.md index 4d5aee402..7960d8a5e 100644 --- a/docs/docs/Get-Started/get-started-installation.md +++ b/docs/docs/Get-Started/get-started-installation.md @@ -63,6 +63,10 @@ To manage your version of Langflow Desktop, follow these steps: 3. To apply the change, click **Confirm**. Langflow desktop restarts to install and activate the new version. +### Manage dependencies in Langflow Desktop + +To manage dependencies in Langflow Desktop, see [Install custom dependencies in Langflow Desktop](/install-custom-dependencies#langflow-desktop). + ## Install and run Langflow with Docker {#install-and-run-langflow-docker} You can use the [Langflow Docker image](https://hub.docker.com/r/langflowai/langflow) to run Langflow in an isolated environment. diff --git a/docs/docs/Support/troubleshooting.md b/docs/docs/Support/troubleshooting.md index 8edd45a1e..ed8a57357 100644 --- a/docs/docs/Support/troubleshooting.md +++ b/docs/docs/Support/troubleshooting.md @@ -112,6 +112,12 @@ There are two possible reasons for this error: * **Version conflict during installation**: Some version conflicts might have occurred during the installation process. To resolve this issue, reinstall Langflow and its dependencies by running `python -m pip install langflow --pre -U --force-reinstall`. +### Package is not installed + +In Langflow OSS, you can follow the error message's instructions to install the missing dependency. + +To manage dependencies in Langflow Desktop, see [Install custom dependencies in Langflow Desktop](/install-custom-dependencies#langflow-desktop). + ## Langflow upgrade issues The following issues can occur when upgrading your Langflow version.