跳到主要内容

安装 Langflow

Langflow 可以通过多种方式安装:

  • Langflow Desktop (推荐): 下载并安装独立的桌面应用程序,获得最简单的设置体验。 此选项包含依赖管理并简化了升级过程。

  • Docker: 拉取并运行 Langflow Docker 镜像以启动 Langflow 容器,并在隔离环境中运行 Langflow。

  • Python 包: 安装并运行 Langflow OSS Python 包。 此选项可让您更好地控制环境、依赖和版本。

  • 从源代码安装: 如果您想为 Langflow 代码库或文档做贡献,请使用此选项。

安装并运行 Langflow Desktop

Langflow Desktop 是 Langflow 的桌面版本,简化了依赖管理和升级。 但是,某些功能在 Langflow Desktop 中不可用,例如 Shareable Playground

Langflow Desktop 需要 macOS 13 或更高版本。

  1. 导航到 Langflow Desktop
  2. 点击 Download Langflow,输入您的联系信息,然后点击 Download
  3. 挂载并安装 Langflow 应用程序。
  4. 安装完成后,打开 Langflow 应用程序,然后使用 Quickstart 创建您的第一个流程。

有关升级信息,请参阅 Release notes

要在 Langflow Desktop 中管理依赖,请参阅 在 Langflow Desktop 中安装自定义依赖

使用 Docker 安装并运行 Langflow

您可以使用 Langflow Docker 镜像来启动 Langflow 容器。 有关更多信息,请参阅 在 Docker 上部署 Langflow

  1. 安装并启动 Docker

  2. 拉取最新的 Langflow Docker 镜像 并启动它:


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

  3. 要访问 Langflow,请导航到 http://localhost:7860/

  4. 使用 Quickstart 创建您的第一个流程。

安装并运行 Langflow OSS Python 包

  1. 确保您拥有所需的依赖项和基础设施:

    • Python
      • macOS and Linux: Version 3.10 to 3.13
      • Windows: Version 3.10 to 3.12
    • uv
    • Sufficient infrastructure:
      • Minimum: Dual-core CPU and 2 GB RAM
      • Recommended: Multi-core CPU and at least 4 GB RAM
  2. 使用 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 then create it with uv:


      _10
      uv venv VENV_NAME

      Replace VENV_NAME with a name for your virtual environment.

    2. 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) ✗

    3. 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. To avoid conflicts with other projects, it's a good idea to deactivate your virtual environment when you're done working in it.

      To delete the virtual environment, type rm -rf VENV_NAME. This completely removes the virtual environment directory and its contents.

  3. 在您的虚拟环境中安装 Langflow:


    _10
    uv pip install langflow

    To install a specific version of the Langflow package by adding the required version to the command, such as uv pip install langflow==1.4.22.

    Reinstall or upgrade Langflow

    To reinstall Langflow and all of its dependencies, run uv pip install langflow --force-reinstall.

    To upgrade Langflow to the latest version, run uv pip install langflow -U. However, the Langflow team recommends taking steps to backup your existing installation before you upgrade Langflow. For more information, see Prepare to upgrade.

  4. 启动 Langflow:


    _10
    uv run langflow run

    It can take a few minutes for Langflow to start.

  5. To confirm that a local Langflow instance is running, navigate to the default Langflow URL http://127.0.0.1:7860.

  6. Create your first flow with the Quickstart.

For upgrade information, see the Release notes.

For information about optional dependency groups and support for custom dependencies to extend Langflow OSS functionality, see Install custom dependencies.

下一步

Search