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

Airflow安装后命令无法运行求助(Python3.6.8环境)

Fixing "Script 'scripts/airflow' not found" Error in Airflow 1.10.12 with Python 3.6.8

Hey there, I’ve dealt with this exact issue before—let’s break down what’s wrong and get your Airflow setup working properly.

What’s Causing the Error?

The root problem is a Python version mismatch in your installation constraints. You’re running Python 3.6.8, but you installed Airflow using a constraints file built for Python 3.7. Even though the install didn’t show errors, this mismatch led to an incomplete installation: the airflow executable script wasn’t properly registered or installed in your environment, which is why pkg_resources can’t find it.

Step-by-Step Fix

Let’s clean up the broken install and do it the right way:

  1. Uninstall the broken Airflow instance
    First, remove the existing Apache Airflow package to start fresh:

    pip uninstall -y apache-airflow
    

    For extra safety, you can check your Python site-packages directory (like /Users/a13220361/airflow_final/lib/python3.6/site-packages/) and delete any remaining apache_airflow or apache_airflow-1.10.12.dist-info folders to eliminate leftover files that might cause conflicts.

  2. Reinstall Airflow with the correct constraints file
    Airflow 1.10.12 has dedicated constraints files for different Python versions. Since you’re on Python 3.6.8, you need to use the constraints file designed for Python 3.6 (not 3.7). Adjust your install command to swap out constraints-3.7.txt with constraints-3.6.txt in the constraint path, then run the command again.

  3. Verify the installation
    Once the reinstall finishes, test if Airflow works by running:

    airflow version
    

    You should see the Airflow 1.10.12 version number printed without any errors if everything went right.

Why This Works

Using the constraints file matched to your Python version ensures all dependencies Airflow requires are fully compatible with Python 3.6.8. This fixes the underlying issue where the airflow script wasn’t properly set up during the initial installation.

内容的提问来源于stack exchange,提问作者Mukesh

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.09 18:22:46