langflow/docs/docs/Get-Started/get-started-installation.md
Gabriel Luiz Freitas Almeida c6b1eaba60
feat: add support for Python 3.13 (#5238)
* 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.
2024-12-12 12:24:43 -08:00

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

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

  1. To run Langflow with uv, enter the following command.
uv run langflow run
  1. To run Langflow with pip, enter the following command.
python -m langflow run
  1. Confirm that a local Langflow instance starts by visiting http://127.0.0.1:7860 in 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__'
  1. Run python -m langflow run instead of langflow run.
  2. If that doesn't work, reinstall the latest Langflow version with python -m pip install langflow -U.
  3. 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:

  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 python -m 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

> 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 Windowshome/<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