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>
This commit is contained in:
Mendon Kissling 2025-07-10 11:57:05 -04:00 committed by GitHub
commit 3fd8824806
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 34 additions and 11 deletions

View file

@ -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.

View file

@ -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.

View file

@ -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.