Skip to main content

Install Langflow

Langflow can be installed in multiple ways:

Install and run Langflow Desktop

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.

  1. Navigate to Langflow 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.

After confirming that Langflow is running, create your first flow with the Quickstart.

Manage your version of Langflow Desktop

When a new version of Langflow is available, Langflow Desktop displays an upgrade message.

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

You can use the Langflow Docker image to run Langflow in an isolated environment. Running applications in Docker containers ensures consistent behavior across different systems and eliminates dependency conflicts.

  1. Install and start Docker.
  2. Pull the latest Langflow Docker image and start it:

_10
docker run -p 7860:7860 langflowai/langflow:latest

  1. To access Langflow, navigate to http://localhost:7860/.

For more information, see Deploy Langflow on 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 for macOS/Linux, and Python 3.10 to 3.12 for Windows
  • uv
  • At minimum, a dual-core CPU and 2 GB RAM, but a multi-core CPU and at least 4 GB RAM are recommended
  1. Create a virtual environment with uv.
Need help with virtual environments?

Virtual environments ensure Langflow is installed in an isolated, fresh environment. To create a new virtual environment, do the following.

  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.

_10
uv venv VENV_NAME

  1. Start the virtual environment.

_10
source VENV_NAME/bin/activate

Your shell's prompt changes to display that you're currently working in a virtual environment.


_10
(VENV_NAME) ➜ langflow git:(main) ✗

  1. 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.
  1. To install Langflow, run the following command.

_10
uv pip install langflow

  1. After installation, start Langflow:

_10
uv run langflow run

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

Manage Langflow OSS versions

To manage your Langflow version, use the following commands.

Manage Langflow OSS versions

To upgrade Langflow to the latest version:


_10
uv pip install langflow -U

To install a specific version of the Langflow package, add the required version to the command:


_10
uv pip install langflow==1.3.2

To reinstall Langflow and all of its dependencies, add the --force-reinstall flag to the command:


_10
uv pip install langflow --force-reinstall

Manage Langflow OSS dependencies

Langflow OSS provides optional dependency groups that extend its functionality.

These dependencies are listed in the pyproject.toml file under [project.optional-dependencies].

Install dependency groups

Install dependency groups using pip's [extras] syntax. For example, to install Langflow with the postgresql dependency group, enter the following command:


_10
uv pip install "langflow[postgresql]"

To install multiple extras, enter the following command:


_10
uv pip install "langflow[deploy,local,postgresql]"

To add your own custom dependencies, see Install custom dependencies.

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:


_10
> 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:


_10
> langflow runTraceback (most recent call last): File ".../langflow", line 5, in <module> 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

_10
> 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/<username>/.cache/langflow/
  • MacOS: /Users/<username>/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:


_10
pip is looking at multiple versions of <<library>> to determine which version is compatible with other requirements. This could take a while.

To work around this issue, install Langflow with uv instead of pip.


_10
uv pip install langflow

To run Langflow with uv:


_10
uv run langflow run

Failed to build required package

When you try to install Langflow on Linux, installation fails because of outdated or missing packages.


_10
Resolved 455 packages in 18.92s
_10
× Failed to build `webrtcvad==2.0.10`
_10
├─▶ The build backend returned an error
_10
╰─▶ Call to `setuptools.build_meta:__legacy__.build_wheel` failed (exit status: 1)

  1. Install the required build dependencies.

_10
sudo apt-get update
_10
sudo apt-get install build-essential python3-dev

  1. If upgrading your packages doesn't fix the issue, install gcc separately.

_10
sudo apt-get install gcc

Installation failure from webrtcvad package

If you experience an error from the webrtcvad package, run uv pip install webrtcvad-wheels in the virtual environment, and then try installing again.

Search