You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

安装Apache Airflow时遇目录不可安装错误求助

解决Apache Airflow安装错误:"Directory '' is not installable..."

问题原因

你使用的命令里的反斜杠\是Unix/Linux系统的换行标记,在Windows环境下会被pip误识别为要安装的目录路径,导致找不到setup.py或pyproject.toml文件,触发报错。

修复方案

方案1:使用单行命令

直接移除反斜杠,将命令整合成一行执行:

py -m pip install 'apache-airflow==2.8.1' --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.1/constraints-3.11.txt"

方案2:适配Windows的换行方式

如果需要拆分命令换行,根据你使用的终端工具选择对应的换行符:

  • CMD终端:用^作为换行符
    py -m pip install 'apache-airflow==2.8.1' ^
    --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.1/constraints-3.11.txt"
    
  • PowerShell终端:用反引号`作为换行符
    py -m pip install 'apache-airflow==2.8.1' `
    --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.8.1/constraints-3.11.txt"
    

内容的提问来源于stack exchange,提问作者Júlia Lemes

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.29 10:32:05