diff --git a/docs/docs/Get-Started/get-started-installation.md b/docs/docs/Get-Started/get-started-installation.md index 33eb8becd..18cc7b73c 100644 --- a/docs/docs/Get-Started/get-started-installation.md +++ b/docs/docs/Get-Started/get-started-installation.md @@ -3,93 +3,250 @@ title: Install Langflow slug: /get-started-installation --- -Langflow can be installed in two ways: +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; -* As a [Python package](#install-langflow-locally) -* As a [standalone desktop application](#install-langflow-desktop) +Langflow can be installed in three ways: -## Install Langflow locally +* As a [Python package](#install-and-run-langflow-oss) with Langflow OSS +* As a [standalone desktop application](#install-and-run-langflow-desktop) with Langflow Desktop +* As a [cloud-hosted service](#datastax-langflow) with DataStax Langflow -Install Langflow locally with [uv (recommended)](https://docs.astral.sh/uv/getting-started/installation/), [pip](https://pypi.org/project/pip/), or [pipx](https://pipx.pypa.io/stable/installation/). +## Install and run Langflow OSS -### Prerequisites +Before you install and run Langflow OSS, be sure you have the following items. -- [Python 3.10 to 3.13](https://www.python.org/downloads/release/python-3100/) installed -- [uv](https://docs.astral.sh/uv/getting-started/installation/), [pip](https://pypi.org/project/pip/), or [pipx](https://pipx.pypa.io/stable/installation/) installed -- Before installing Langflow, we recommend creating a virtual environment to isolate your Python dependencies with [uv](https://docs.astral.sh/uv/pip/environments), [venv](https://docs.python.org/3/library/venv.html), or [conda](https://anaconda.org/anaconda/conda) +- [Python 3.10 to 3.13](https://www.python.org/downloads/release/python-3100/) +- [uv](https://docs.astral.sh/uv/getting-started/installation/) or [pip](https://pypi.org/project/pip/) +- A virtual environment created with [uv](https://docs.astral.sh/uv/pip/environments) or [venv](https://docs.python.org/3/library/venv.html) -### Install Langflow with pip or pipx +Install and run Langflow OSS with [uv (recommended)](https://docs.astral.sh/uv/getting-started/installation/) or [pip](https://pypi.org/project/pip/). -Install Langflow with uv: +1. To install Langflow, use one of the following commands: + + + ```bash uv pip install langflow ``` -Install Langflow with pip: + + ```bash -python -m pip install langflow +pip install langflow ``` -Install Langflow with pipx using the Python 3.10 executable: + + -```bash -pipx install langflow --python python3.10 -``` +2. To run Langflow, use one of the following commands: -## Run Langflow - -1. To run Langflow with uv, enter the following command. + + ```bash uv run langflow run ``` -2. To run Langflow with pip, enter the following command. + + ```bash python -m langflow run ``` -3. Confirm that a local Langflow instance starts by visiting `http://127.0.0.1:7860` in a Chromium-based browser. + + -Now that Langflow is running, follow the [Quickstart](/get-started-quickstart) to create your first flow. +3. To confirm that a local Langflow instance starts, go to the default Langflow URL at `http://127.0.0.1:7860`. -## Manage Langflow versions +After confirming that Langflow is running, create your first flow with the [Quickstart](/get-started-quickstart). -To upgrade Langflow to the latest version with uv, use the uv pip upgrade command. +### Manage Langflow OSS versions + +To upgrade Langflow to the latest version, use one of the following commands: + + + ```bash uv pip install langflow -U ``` -To upgrade Langflow to the latest version, use the pip upgrade command. + + ```bash -python -m pip install langflow -U +pip install langflow -U ``` + + + To install a specific version of the Langflow package, add the required version to the command. + + ```bash -python -m pip install langflow==1.1 +uv pip install langflow==1.3.2 ``` + + + +```bash +pip install langflow==1.3.2 +``` + + + + To reinstall Langflow and all of its dependencies, add the `--force-reinstall` flag to the command. + + ```bash -python -m pip install langflow --force-reinstall +uv pip install langflow --force-reinstall ``` -## Install Langflow Desktop + + + +```bash +pip install langflow --force-reinstall +``` + + + + +### Install optional dependencies for Langflow OSS + +Langflow OSS provides optional dependency groups that extend its functionality. + +These dependencies are listed in the [pyproject.toml](https://github.com/langflow-ai/langflow/blob/main/pyproject.toml#L191) file under `[project.optional-dependencies]`. + +Install dependency groups using pip's `[extras]` syntax. For example, to install Langflow with the `postgresql` dependency group, enter one of the following commands: + + + + +```bash +uv pip install "langflow[postgresql]" +``` + + + + +```bash +pip install "langflow[postgresql]" +``` + + + + +To install multiple extras, enter one of the following commands: + + + + +```bash +uv pip install "langflow[deploy,local,postgresql]" +``` + + + + +```bash +pip install "langflow[deploy,local,postgresql]" +``` + + + + +To add your own custom dependencies, see [Install custom dependencies](/install-custom-dependencies). + +### Stop Langflow OSS + +To stop Langflow, in the terminal where it's running, enter `Ctrl+C`. + +To deactivate your virtual environment, enter `deactivate`. + +### Common OSS installation issues + +This is a list of possible issues that you may encounter when installing and running Langflow. + +#### No `langflow.__main__` module + +When you try to run Langflow with the command `langflow run`, you encounter the following error: + +```bash +> No module named 'langflow.__main__' +``` + +1. Run `uv run langflow run` instead of `langflow run`. +2. If that doesn't work, reinstall the latest Langflow version with `uv pip install langflow -U`. +3. If that doesn't work, reinstall Langflow and its dependencies with `uv pip install langflow --pre -U --force-reinstall`. + +#### Langflow runTraceback + +When you try to run Langflow using the command `langflow run`, you encounter the following error: + +```bash +> langflow runTraceback (most recent call last): File ".../langflow", line 5, in from langflow.__main__ import mainModuleNotFoundError: No module named 'langflow.__main__' +``` + +There are two possible reasons for this error: + +1. You've installed Langflow using `pip install langflow` but you already had a previous version of Langflow installed in your system. In this case, you might be running the wrong executable. To solve this issue, run the correct executable by running `python -m langflow run` instead of `langflow run`. If that doesn't work, try uninstalling and reinstalling Langflow with `uv pip install langflow --pre -U`. +2. Some version conflicts might have occurred during the installation process. Run `python -m pip install langflow --pre -U --force-reinstall` to reinstall Langflow and its dependencies. + +#### Something went wrong running migrations + +```bash +> Something went wrong running migrations. Please, run 'langflow migration --fix' +``` + +Clear the cache by deleting the contents of the cache folder. + +This folder can be found at: + +- **Linux or WSL2 on Windows**: `home//.cache/langflow/` +- **MacOS**: `/Users//Library/Caches/langflow/` + +This error can occur during Langflow upgrades when the new version can't override `langflow-pre.db` in `.cache/langflow/`. Clearing the cache removes this file but also erases your settings. + +If you wish to retain your files, back them up before clearing the folder. + +#### Langflow installation freezes at pip dependency resolution + +Installing Langflow with `pip install langflow` slowly fails with this error message: + +```text +pip is looking at multiple versions of <> to determine which version is compatible with other requirements. This could take a while. +``` + +To work around this issue, install Langflow with [`uv`](https://docs.astral.sh/uv/getting-started/installation/) instead of `pip`. + +```text +uv pip install langflow +``` + +To run Langflow with uv: + +```text +uv run langflow run +``` + +## Install and run Langflow Desktop :::important Langflow Desktop is in **Alpha**. Development is ongoing, and the features and functionality are subject to change. ::: -**Langflow Desktop** is a desktop version of Langflow that includes all the features of open source Langflow, with an additional **Version Management** feature for managing your Langflow version. +**Langflow Desktop** is a desktop version of Langflow that includes all the features of open source Langflow, with an additional [version management](#manage-your-langflow-version-in-langflow-desktop) feature for managing your Langflow version. :::important Langflow Desktop is available only for macOS. @@ -120,68 +277,6 @@ A confirmation pane containing the selected version's changelog appears. 3. To change to the selected version, click **Confirm**. The application restarts with the new version installed. -## Common installation issues +## DataStax Langflow {#datastax-langflow} -This is a list of possible issues that you may encounter when installing and running Langflow. - -### No `langflow.__main__` module - -When you try to run Langflow with the command `langflow run`, you encounter the following error: - -```bash -> No module named 'langflow.__main__' -``` - -1. Run `python -m langflow run` instead of `langflow run`. -2. If that doesn't work, reinstall the latest Langflow version with `python -m pip install langflow -U`. -3. If that doesn't work, reinstall Langflow and its dependencies with `python -m pip install langflow --pre -U --force-reinstall`. - -### Langflow runTraceback - -When you try to run Langflow using the command `langflow run`, you encounter the following error: - -```bash -> langflow runTraceback (most recent call last): File ".../langflow", line 5, in from langflow.__main__ import mainModuleNotFoundError: No module named 'langflow.__main__' -``` - -There are two possible reasons for this error: - -1. You've installed Langflow using `pip install langflow` but you already had a previous version of Langflow installed in your system. In this case, you might be running the wrong executable. To solve this issue, run the correct executable by running `python -m langflow run` instead of `langflow run`. If that doesn't work, try uninstalling and reinstalling Langflow with `python -m pip install langflow --pre -U`. -2. Some version conflicts might have occurred during the installation process. Run `python -m pip install langflow --pre -U --force-reinstall` to reinstall Langflow and its dependencies. - -### Something went wrong running migrations - -```bash -> Something went wrong running migrations. Please, run 'langflow migration --fix' -``` - -Clear the cache by deleting the contents of the cache folder. - -This folder can be found at: - -- **Linux or WSL2 on Windows**: `home//.cache/langflow/` -- **MacOS**: `/Users//Library/Caches/langflow/` - -This error can occur during Langflow upgrades when the new version can't override `langflow-pre.db` in `.cache/langflow/`. Clearing the cache removes this file but also erases your settings. - -If you wish to retain your files, back them up before clearing the folder. - -### Langflow installation freezes at pip dependency resolution - -Installing Langflow with `pip install langflow` slowly fails with this error message: - -```text -pip is looking at multiple versions of <> to determine which version is compatible with other requirements. This could take a while. -``` - -To work around this issue, install Langflow with [`uv`](https://docs.astral.sh/uv/getting-started/installation/) instead of `pip`. - -```text -uv pip install langflow -``` - -To run Langflow with uv: - -```text -uv run langflow run -``` +**DataStax Langflow** is a hosted version of Langflow integrated with [Astra DB](https://www.datastax.com/products/datastax-astra). Be up and running in minutes with no installation or setup required. [Sign up for free](https://astra.datastax.com/signup?type=langflow).