Install Langflow
Langflow can be installed in three ways:
- As a Python package with Langflow OSS
- As a standalone desktop application with Langflow Desktop
- As a cloud-hosted service with DataStax Langflow
Install and run Langflow OSS
Before you install and run Langflow OSS, be sure you have the following items.
- Python 3.10 to 3.13
- uv or pip
- A virtual environment created with uv or venv
Install and run Langflow OSS with uv (recommended) or pip.
- To install Langflow, use one of the following commands:
- uv
- pip
_10uv pip install langflow
_10pip install langflow
- To run Langflow, use one of the following commands:
- uv
- pip
_10uv run langflow run
_10python -m langflow run
- To confirm that a local Langflow instance starts, go to the default Langflow URL at
http://127.0.0.1:7860
.
After confirming that Langflow is running, create your first flow with the Quickstart.
Manage Langflow OSS versions
To upgrade Langflow to the latest version, use one of the following commands:
- uv
- pip
_10uv pip install langflow -U
_10pip install langflow -U
To install a specific version of the Langflow package, add the required version to the command.
- uv
- pip
_10uv pip install langflow==1.3.2
_10pip install langflow==1.3.2
To reinstall Langflow and all of its dependencies, add the --force-reinstall
flag to the command.
- uv
- pip
_10uv pip install langflow --force-reinstall
_10pip 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 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:
- uv
- pip
_10uv pip install "langflow[postgresql]"
_10pip install "langflow[postgresql]"
To install multiple extras, enter one of the following commands:
- uv
- pip
_10uv pip install "langflow[deploy,local,postgresql]"
_10pip install "langflow[deploy,local,postgresql]"
To add your own custom dependencies, see 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:
_10> No module named 'langflow.__main__'
- Run
uv run langflow run
instead oflangflow run
. - If that doesn't work, reinstall the latest Langflow version with
uv pip install langflow -U
. - 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:
- 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 runningpython -m langflow run
instead oflangflow run
. If that doesn't work, try uninstalling and reinstalling Langflow withuv pip install langflow --pre -U
. - 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:
_10pip 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
.
_10uv pip install langflow
To run Langflow with uv:
_10uv run langflow run
Install and run Langflow Desktop
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 available only for macOS.
To install Langflow Desktop, follow these steps:
- Navigate to Langflow Desktop.
- Enter your Name, Email address, and Company, and then click Download.
- Open the Finder, and then navigate to Downloads.
- Double-click the downloaded
*.dmg
file. - To install Langflow Desktop, drag and drop the application icon to the Applications folder.
- When the installation completes, open the Langflow application.
The application checks uv, 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:
- 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.
- To change your Langflow version, select another version. A confirmation pane containing the selected version's changelog appears.
- To change to the selected version, click Confirm. The application restarts with the new version installed.
DataStax Langflow
DataStax Langflow is a hosted version of Langflow integrated with Astra DB. Be up and running in minutes with no installation or setup required. Sign up for free.