无法安装 alembic==1.5.8,因为这些包版本具有冲突的依赖项

Cannot install alembic==1.5.8 because these package versions have conflicting dependencies

我正在尝试 运行 几天使用 airflow 2.0.2,我想安装此文件 (https://github.com/aws/aws-mwaa-local-runner/blob/main/docker/config/requirements.txt) 和 constrinats.txt (https://github.com/aws/aws-mwaa-local-runner/blob/main/docker/config/constraints.txt 中的所有要求) 这样我就不会收到“找不到模块的错误”。有人可以在此过程中帮助我吗?

我的 python 版本是 3.9.7,我有一个需求文件和约束如下

requirements.txt

-c "https://raw.githubusercontent.com/apache/airflow/constraints-main/constraints-3.7.txt"
# Replacement for the local package installed from CodeArtifact
alembic==1.5.8
amqp==2.6.1
apache-airflow==2.0.2
apache-airflow-providers-amazon==1.3.0
apache-airflow-providers-celery==1.0.1
apache-airflow-providers-ftp==1.0.1
apache-airflow-providers-http==1.1.1
apache-airflow-providers-imap==1.0.1
apache-airflow-providers-sqlite==1.0.2
apispec==3.3.2
argcomplete==1.12.3
attrs==20.3.0
babel==2.9.1
billiard==3.6.4.0
blinker==1.4
boto3==1.17.53
botocore==1.20.53
cached-property==1.5.2
cattrs==1.5.0
celery==4.4.7
certifi==2020.12.5
cffi==1.14.5
chardet==3.0.4
click==7.1.2
clickclick==20.10.2
colorama==0.4.4
colorlog==5.0.1
commonmark==0.9.1
connexion==2.7.0
croniter==0.3.37
cryptography==3.4.7
defusedxml==0.7.1
dill==0.3.2
dnspython==1.16.0
docutils==0.16
email-validator==1.1.2
Flask==1.1.2
Flask-AppBuilder==3.3.0
Flask-Babel==1.0.0
Flask-Caching==1.10.1
Flask-JWT-Extended==3.25.1
Flask-Login==0.4.1
Flask-OpenID==1.2.5
Flask-SQLAlchemy==2.5.1
Flask-WTF==0.14.3
flower==0.9.7
graphviz==0.16
gunicorn==19.10.0
humanize==3.4.1
idna==2.10
importlib-metadata==1.7.0
importlib-resources==1.5.0
inflection==0.5.1
iso8601==0.1.14
isodate==0.6.0
itsdangerous==1.1.0
Jinja2==2.11.3
jmespath==0.10.0
jsonschema==3.2.0
kombu==4.6.11
lazy-object-proxy==1.4.3
lockfile==0.12.2
Mako==1.1.4
Markdown==3.3.4
MarkupSafe==1.1.1
marshmallow==3.11.1
marshmallow-enum==1.5.1
marshmallow-oneofschema==2.1.0
marshmallow-sqlalchemy==0.23.1
natsort==7.1.1
numpy==1.20.2
openapi-schema-validator==0.1.5
openapi-spec-validator==0.3.0
pandas==1.2.4
pendulum==2.1.2
prison==0.1.3
prometheus-client==0.8.0
psutil==5.8.0
psycopg2==2.8.6
pycparser==2.20
pycurl==7.43.0.5
Pygments==2.8.1
PyJWT==1.7.1
pyrsistent==0.17.3
python-daemon==2.3.0
python-dateutil==2.8.1
python-editor==1.0.4
python-nvd3==0.15.0
python-slugify==4.0.1
python3-openid==3.2.0
pytz==2021.1
pytzdata==2020.1
PyYAML==5.4.1
requests==2.25.1
rich==9.2.0
s3transfer==0.3.7
setproctitle==1.2.2
six==1.15.0
SQLAlchemy==1.3.24
SQLAlchemy-JSONField==1.0.0
SQLAlchemy-Utils==0.37.0
statsd==3.3.0
swagger-ui-bundle==0.0.8
tabulate==0.8.9
tenacity==6.2.0
termcolor==1.1.0
text-unidecode==1.3
tornado==6.1
typing-extensions==3.7.4.3
unicodecsv==0.14.1
urllib3==1.25.11
vine==1.3.0
watchtower==0.7.3
Werkzeug==1.0.1
WTForms==2.3.3
zipp==3.4.1

当我尝试安装命令时 pip install -r requirements.txt

我收到一个错误:

ERROR: Cannot install alembic==1.5.8 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested alembic==1.5.8
    The user requested (constraint) alembic==1.7.7

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

为什么我应该安装所有 requiremnts.txt

requirements.txt 状态

# Replacement for the local package installed from CodeArtifact
alembic==1.5.8

指定版本 1.5.8 - 但是需要版本 1.7.7 - 只需将 requirements.txt 上的这一行更改为 alembic 版本 1.7.7

alembic==1.7.7