Install Langflow
Langflow can be installed in multiple ways:
-
Langflow Desktop (Recommended): Download and install the standalone desktop application for the easiest setup experience.
-
Docker: Pull and run the Docker image to start a Langflow container.
-
Python package: Install the Langflow OSS Python package.
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.
- macOS
- Windows
- Navigate to Langflow Desktop.
- Click Download Langflow, enter your contact information, and then click Download.
- Mount and install the Langflow application.
- When the installation completes, open the Langflow application.
After confirming that Langflow is running, create your first flow with the Quickstart.
Windows installations of Langflow Desktop require a C++ compiler, such as Visual Studio, 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.
- Navigate to Langflow Desktop.
- Click Download Langflow, enter your contact information, and then click Download.
- Open the File Explorer, and then navigate to Downloads.
- Double-click the downloaded
.msi
file, and then use the install wizard to install Langflow Desktop. - 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:
- 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.
- To change your Langflow version, select another version. A confirmation pane containing the selected version's changelog appears.
- 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.
- Install and start Docker.
- Pull the latest Langflow Docker image and start it:
_10docker run -p 7860:7860 langflowai/langflow:latest
- 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
- 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.
- macOS/Linux
- Windows
- Navigate to where you want your virtual environment to be created, and create it with
uv
. ReplaceVENV_NAME
with your preferred name for your virtual environment.
_10uv venv VENV_NAME
- Start the virtual environment.
_10source 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) ✗
- 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, typerm -rf VENV_NAME
.
- Navigate to where you want your virtual environment to be created, and create it with
uv
. ReplaceVENV_NAME
with your preferred name for your virtual environment.
_10uv venv VENV_NAME
- Start the virtual environment.
_10VENV_NAME\Scripts\activate
Your shell's prompt changes to display that you're currently working in a virtual environment.
_10(VENV_NAME) PS C:/users/username/langflow-dir>
- 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, typeRemove-Item VENV_NAME
.
- To install Langflow, run the following command.
_10uv pip install langflow
- After installation, start Langflow:
_10uv run langflow run
- 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:
_10uv pip install langflow -U
To install a specific version of the Langflow package, add the required version to the command:
_10uv pip install langflow==1.3.2
To reinstall Langflow and all of its dependencies, add the --force-reinstall
flag to the command:
_10uv 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:
_10uv pip install "langflow[postgresql]"
To install multiple extras, enter the following command:
_10uv 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__'
- 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
Failed to build required package
When you try to install Langflow on Linux, installation fails because of outdated or missing packages.
_10Resolved 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)
- Install the required build dependencies.
_10sudo apt-get update_10sudo apt-get install build-essential python3-dev
- If upgrading your packages doesn't fix the issue, install
gcc
separately.
_10sudo 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.