* chore: update Python version requirement and remove deprecated dependencies in pyproject.toml files * Updated Python version requirement to allow up to 3.14 in both main and base pyproject.toml files. * Removed deprecated dependencies: cohere and pyautogen from the main dependencies list. * chore: update Python version requirements and add support for Python 3.13 in uv.lock * Updated the required Python version to allow up to 3.14. * Adjusted resolution markers for Python versions to include 3.13. * Added markers for the 'typing-extensions' dependency to restrict it for Python versions below 3.13. * Included additional wheel files for various packages to support Python 3.13 compatibility. * Update Python version requirements in README files to support Python 3.13 * Update Python version in GitHub Actions workflow to 3.13 * Update Python version in GitHub Actions workflows to include 3.13 * Update installation documentation to support Python 3.13 and clarify troubleshooting steps * revert changes to docs until we release * chore: add ag2 dependency and update uv.lock for Python 3.13 compatibility * Added ag2 version 0.3.2 and 0.5.2 to pyproject.toml and uv.lock with appropriate resolution markers for Python versions. * Included flaml version 2.3.2 in uv.lock to ensure compatibility with the new ag2 dependency. * Updated dependency specifications to support Python 3.13 and above.
5.2 KiB
| title | sidebar_position | slug |
|---|---|---|
| Install Langflow | 1 | /get-started-installation |
You can deploy Langflow either locally or as a hosted service with Datastax Langflow.
Install Langflow locally
Install Langflow locally with uv (recommended), pip, or pipx.
Prerequisites
- Python 3.10 to 3.12 installed
- uv, pip, or pipx installed
- Before installing Langflow, we recommend creating a virtual environment to isolate your Python dependencies with uv, venv, or conda
Install Langflow with pip or pipx
Install Langflow with uv:
uv pip install langflow
Install Langflow with pip:
python -m pip install langflow
Install Langflow with pipx using the Python 3.10 executable:
pipx install langflow --python python3.10
Run Langflow
- To run Langflow with uv, enter the following command.
uv run langflow run
- To run Langflow with pip, enter the following command.
python -m langflow run
- Confirm that a local Langflow instance starts by visiting
http://127.0.0.1:7860in a Chromium-based browser.
Now that Langflow is running, follow the Quickstart to create your first flow.
Manage Langflow versions
To upgrade Langflow to the latest version with uv, use the uv pip upgrade command.
uv pip install langflow -U
To upgrade Langflow to the latest version, use the pip upgrade command.
python -m pip install langflow -U
To install a specific version of the Langflow package, add the required version to the command.
python -m pip install langflow==1.1
To reinstall Langflow and all of its dependencies, add the --force-reinstall flag to the command.
python -m pip install langflow --force-reinstall
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.
Common 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:
> No module named 'langflow.__main__'
- Run
python -m langflow runinstead oflangflow run. - If that doesn't work, reinstall the latest Langflow version with
python -m pip install langflow -U. - 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:
> 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 langflowbut 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 runinstead oflangflow run. If that doesn't work, try uninstalling and reinstalling Langflow withpython -m pip install langflow --pre -U. - Some version conflicts might have occurred during the installation process. Run
python -m pip install langflow --pre -U --force-reinstallto reinstall Langflow and its dependencies.
Something went wrong running migrations
> 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:
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.
uv pip install langflow
To run Langflow with uv:
uv run langflow run