docs: refactor installation page (#8487)

* initial-changes

* install-by-os

* powershell-install-and-venvs

* clearer-intro

* post-install-and-ordering

* readme quickstart

* run

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* dependency-extras

* move-troubleshooting-to-details-tabs

* manage-versions-tabs

* left-align

* Apply suggestions from code review

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>

* add-venv-deactivate-why

---------

Co-authored-by: April I. Murphy <36110273+aimurphy@users.noreply.github.com>
Co-authored-by: KimberlyFields <46325568+KimberlyFields@users.noreply.github.com>
This commit is contained in:
Mendon Kissling 2025-06-20 17:34:46 -04:00 committed by GitHub
commit 0c9d378161
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 173 additions and 168 deletions

View file

@ -19,39 +19,37 @@
## ✨ Highlight features
1. **Visual Builder** to get started quickly and iterate.
1. **Access to Code** so developers can tweak any component using Python.
1. **Playground** to immediately test and iterate on their flows with step-by-step control.
1. **Multi-agent** orchestration and conversation management and retrieval.
1. **Deploy as an API** or export as JSON for Python apps.
1. **Observability** with LangSmith, LangFuse and other integrations.
1. **Enterprise-ready** security and scalability.
- **Visual builder interface** to quickly get started and iterate .
- **Source code access** lets you customize any component using Python.
- **Interactive playground** to immediately test and refine your flows with step-by-step control.
- **Multi-agent orchestration** with conversation management and retrieval.
- **Deploy as an API** or export as JSON for Python apps.
- **Observability** with LangSmith, LangFuse and other integrations.
- **Enterprise-ready** security and scalability.
## ⚡️ Quickstart
Langflow works with Python 3.10 to 3.13.
Langflow requires [Python 3.10 to 3.13](https://www.python.org/downloads/release/python-3100/) and [uv](https://docs.astral.sh/uv/getting-started/installation/).
Install with uv **(recommended)**
1. To install Langflow, run:
```shell
uv pip install langflow
```
Install with pip
2. To run Langflow, run:
```shell
pip install langflow
uv run langflow run
```
3. Go to the default Langflow URL at `http://127.0.0.1:7860`.
For more information about installing Langflow, including Docker and Desktop options, see [Install Langflow](https://docs.langflow.org/get-started-installation).
## 📦 Deployment
### Self-managed
Langflow is completely open source and you can deploy it to all major deployment clouds. Follow this [guide](https://docs.langflow.org/deployment-docker) to learn how to use Docker to deploy Langflow.
### Fully-managed by DataStax
DataStax Langflow is a full-managed environment with zero setup. Developers can [sign up for a free account](https://astra.datastax.com/signup?type=langflow) to get started.
Langflow is completely open source and you can deploy it to all major deployment clouds. To learn how to use Docker to deploy Langflow, see the [Docker deployment guide](https://docs.langflow.org/deployment-docker).
## ⭐ Stay up-to-date

View file

@ -6,179 +6,207 @@ slug: /get-started-installation
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
Langflow can be installed in three ways:
Langflow can be installed in multiple ways:
* 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
* **Langflow Desktop (Recommended)**: Download and install the [standalone desktop application](#install-and-run-langflow-desktop) for the easiest setup experience.
## Install and run Langflow OSS
* **Docker**: Pull and run the [Docker image](#install-and-run-langflow-docker) to start a Langflow container.
Before you install and run Langflow OSS, be sure you have the following items.
* **Python package**: Install the [Langflow OSS Python package](#install-and-run-langflow-oss).
- [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)
- A dual-core CPU and at least 2 GB of RAM. More intensive use requires a multi-core CPU and at least 4 GB of RAM.
## Install and run Langflow Desktop
Install and run Langflow OSS with [uv (recommended)](https://docs.astral.sh/uv/getting-started/installation/) or [pip](https://pypi.org/project/pip/).
**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.
1. To install Langflow, use one of the following commands:
<Tabs groupId="os">
<TabItem value="macOS" label="macOS">
<Tabs groupId="package-manager">
<TabItem value="uv" label="uv" default>
1. Navigate to [Langflow Desktop](https://www.langflow.org/desktop).
2. Click **Download Langflow**, enter your contact information, and then click **Download**.
3. Mount and install the Langflow application.
4. When the installation completes, open the Langflow application.
```bash
uv pip install langflow
```
After confirming that Langflow is running, create your first flow with the [Quickstart](/get-started-quickstart).
</TabItem>
<TabItem value="pip" label="pip">
</TabItem>
<TabItem value="Windows" label="Windows">
:::important
Windows installations of Langflow Desktop require a C++ compiler, such as [Visual Studio](https://visualstudio.microsoft.com/downloads/), that may not be present on your system. If you receive a `C++ Build Tools Required!` error, follow the on-screen prompt to install Microsoft C++ Build Tools, or visit the Visual Studio download link above.
:::
```bash
pip install langflow
```
1. Navigate to [Langflow Desktop](https://www.langflow.org/desktop).
2. Click **Download Langflow**, enter your contact information, and then click **Download**.
3. Open the **File Explorer**, and then navigate to **Downloads**.
4. Double-click the downloaded `.msi` file, and then use the install wizard to install Langflow Desktop.
6. When the installation completes, open the Langflow application.
After confirming that Langflow is running, create your first flow with the [Quickstart](/get-started-quickstart).
</TabItem>
</TabItem>
</Tabs>
2. To run Langflow, use one of the following commands:
### Manage your version of Langflow Desktop
<Tabs groupId="package-manager">
<TabItem value="uv" label="uv">
When a new version of Langflow is available, Langflow Desktop displays an upgrade message.
```bash
uv run langflow run
To manage your version of Langflow Desktop, follow these steps:
1. In Langflow Desktop, click your profile image, and then select **Version Management**.
The **Version Management** pane lists your active Langflow version first, followed by other available versions.
The **latest** version is always highlighted.
2. To change your Langflow version, select another version.
A confirmation pane containing the selected version's changelog appears.
3. To apply the change, click **Confirm**.
Langflow desktop restarts to install and activate the new version.
## 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.
Running applications in [Docker](https://docs.docker.com/) containers ensures consistent behavior across different systems and eliminates dependency conflicts.
1. Install and start [Docker](https://docs.docker.com/).
2. Pull the latest [Langflow Docker image](https://hub.docker.com/r/langflowai/langflow) and start it:
```bash
docker run -p 7860:7860 langflowai/langflow:latest
```
3. To access Langflow, navigate to `http://localhost:7860/`.
For more information, see [Deploy Langflow on Docker](/deployment-docker).
## Install and run the Langflow OSS Python package
To install and run Langflow OSS, you need the following:
- [Python 3.10 to 3.13](https://www.python.org/downloads/release/python-3100/) for macOS/Linux, and Python 3.10 to 3.12 for Windows
- [uv](https://docs.astral.sh/uv/getting-started/installation/)
- At minimum, a dual-core CPU and 2GB RAM, but a multi-core CPU and at least 4GB RAM are recommended
1. Create a virtual environment with [uv](https://docs.astral.sh/uv/pip/environments).
<details>
<summary>Need help with virtual environments?</summary>
Virtual environments ensure Langflow is installed in an isolated, fresh environment.
To create a new virtual environment, do the following.
<Tabs groupId="os">
<TabItem value="macOS/Linux" label="macOS/Linux" default>
1. Navigate to where you want your virtual environment to be created, and create it with `uv`.
Replace `VENV_NAME` with your preferred name for your virtual environment.
```
</TabItem>
<TabItem value="pip" label="pip">
```bash
python -m langflow run
uv venv VENV_NAME
```
2. Start the virtual environment.
```
source VENV_NAME/bin/activate
```
Your shell's prompt changes to display that you're currently working in a virtual environment.
```
(VENV_NAME) ➜ langflow git:(main) ✗
```
3. To deactivate the virtual environment and return to your regular shell, type `deactivate`.
When activated, the virtual environment temporarily modifies your PATH variable to prioritize packages installed within the virtual environment, so always deactivate it when you're done to avoid conflicts with other projects.
To delete the virtual environment, type `rm -rf VENV_NAME`.
</TabItem>
<TabItem value="Windows" label="Windows">
1. Navigate to where you want your virtual environment to be created, and create it with `uv`.
Replace `VENV_NAME` with your preferred name for your virtual environment.
```
uv venv VENV_NAME
```
2. Start the virtual environment.
```shell
VENV_NAME\Scripts\activate
```
Your shell's prompt changes to display that you're currently working in a virtual environment.
```
(VENV_NAME) PS C:/users/username/langflow-dir>
```
3. To deactivate the virtual environment and return to your regular shell, type `deactivate`.
When activated, the virtual environment temporarily modifies your PATH variable to prioritize packages installed within the virtual environment, so always deactivate it when you're done to avoid conflicts with other projects.
To delete the virtual environment, type `Remove-Item VENV_NAME`.
</TabItem>
</Tabs>
</TabItem>
</Tabs>
</details>
3. To confirm that a local Langflow instance starts, go to the default Langflow URL at `http://localhost:7860`.
2. To install Langflow, run the following command.
```bash
uv pip install langflow
```
3. After installation, start Langflow:
```bash
uv run langflow run
```
4. To confirm that a local Langflow instance is running, navigate to the default Langflow URL `http://127.0.0.1:7860`.
It can take a few minutes for Langflow to start.
After confirming that Langflow is running, create your first flow with the [Quickstart](/get-started-quickstart).
### Manage Langflow OSS versions
To upgrade Langflow to the latest version, use one of the following commands:
To manage your Langflow version, use the following commands.
<Tabs groupId="package-manager">
<TabItem value="uv" label="uv" default>
<details closed>
<summary>Manage Langflow OSS versions</summary>
To upgrade Langflow to the latest version:
```bash
uv pip install langflow -U
```
</TabItem>
<TabItem value="pip" label="pip">
```bash
pip install langflow -U
```
</TabItem>
</Tabs>
To install a specific version of the Langflow package, add the required version to the command.
<Tabs groupId="package-manager">
<TabItem value="uv" label="uv" default>
To install a specific version of the Langflow package, add the required version to the command:
```bash
uv pip install langflow==1.3.2
```
</TabItem>
<TabItem value="pip" label="pip">
```bash
pip install langflow==1.3.2
```
</TabItem>
</Tabs>
To reinstall Langflow and all of its dependencies, add the `--force-reinstall` flag to the command.
<Tabs groupId="package-manager">
<TabItem value="uv" label="uv" default>
To reinstall Langflow and all of its dependencies, add the `--force-reinstall` flag to the command:
```bash
uv pip install langflow --force-reinstall
```
</TabItem>
<TabItem value="pip" label="pip">
</details>
```bash
pip install langflow --force-reinstall
```
</TabItem>
</Tabs>
### Install optional dependencies for Langflow OSS
### Manage Langflow OSS dependencies
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:
<details closed>
<summary>Install dependency groups</summary>
<Tabs groupId="package-manager">
<TabItem value="uv" label="uv" default>
Install dependency groups using pip's `[extras]` syntax. For example, to install Langflow with the `postgresql` dependency group, enter the following command:
```bash
uv pip install "langflow[postgresql]"
```
</TabItem>
<TabItem value="pip" label="pip">
```bash
pip install "langflow[postgresql]"
```
</TabItem>
</Tabs>
To install multiple extras, enter one of the following commands:
<Tabs groupId="package-manager">
<TabItem value="uv" label="uv" default>
To install multiple extras, enter the following command:
```bash
uv pip install "langflow[deploy,local,postgresql]"
```
</TabItem>
<TabItem value="pip" label="pip">
```bash
pip install "langflow[deploy,local,postgresql]"
```
</TabItem>
</Tabs>
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`.
</details>
### Common OSS installation issues
This is a list of possible issues that you may encounter when installing and running Langflow.
#### No `langflow.__main__` module
<details>
<summary>No <code>langflow.__main__</code> module</summary>
When you try to run Langflow with the command `langflow run`, you encounter the following error:
@ -190,7 +218,10 @@ When you try to run Langflow with the command `langflow run`, you encounter the
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
</details>
<details>
<summary>Langflow runTraceback</summary>
When you try to run Langflow using the command `langflow run`, you encounter the following error:
@ -203,7 +234,10 @@ 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
</details>
<details>
<summary>Something went wrong running migrations</summary>
```bash
> Something went wrong running migrations. Please, run 'langflow migration --fix'
@ -220,7 +254,10 @@ This error can occur during Langflow upgrades when the new version can't overrid
If you wish to retain your files, back them up before clearing the folder.
#### Langflow installation freezes at pip dependency resolution
</details>
<details>
<summary>Langflow installation freezes at pip dependency resolution</summary>
Installing Langflow with `pip install langflow` slowly fails with this error message:
@ -240,7 +277,10 @@ To run Langflow with uv:
uv run langflow run
```
#### Failed to build required package
</details>
<details>
<summary>Failed to build required package</summary>
When you try to install Langflow on Linux, installation fails because of outdated or missing packages.
@ -264,44 +304,11 @@ sudo apt-get install build-essential python3-dev
sudo apt-get install gcc
```
## Install and run Langflow Desktop
</details>
:::important
Langflow Desktop is in **Alpha**.
Development is ongoing, and the features and functionality are subject to change.
:::
<details>
<summary>Installation failure from <code>webrtcvad</code> package</summary>
**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.
If you experience an error from the `webrtcvad` package, run `uv pip install webrtcvad-wheels` in the virtual environment, and then try installing again.
:::important
Langflow Desktop is available only for macOS.
:::
To install Langflow Desktop, follow these steps:
1. Navigate to [Langflow Desktop](https://www.langflow.org/desktop).
2. Enter your **Name**, **Email address**, and **Company**, and then click **Download**.
3. Open the **Finder**, and then navigate to **Downloads**.
4. Double-click the downloaded `*.dmg` file.
5. To install Langflow Desktop, drag and drop the application icon to the **Applications** folder.
6. When the installation completes, open the Langflow application.
The application checks [uv](https://docs.astral.sh/uv/concepts/tools/), your local environment, and the Langflow version, and then starts.
### Manage your Langflow version in Langflow Desktop
When a new version of Langflow is available, Langflow Desktop displays an upgrade message.
To manage your Langflow version in Langflow Desktop, follow these steps:
1. To access Langflow Desktop's **Version Management** pane, click your **Profile Image**, and then select **Version Management**.
Langflow Desktop's current version is displayed, with other version options listed after it.
The **latest** version is always highlighted.
2. To change your Langflow version, select another version.
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.
## DataStax Langflow {#datastax-langflow}
**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).
</details>