Skip to content

omegaconf<2.1 的元数据不合法,导致在 pip>=24.1 环境下安装失败 #2556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
XiaoPeng0x3 opened this issue Apr 20, 2025 · 0 comments

Comments

@XiaoPeng0x3
Copy link

在使用 pip>=24.1 安装依赖时,omegaconf==2.0.5 和 2.0.6 被 pip 忽略,这两个版本的元数据中包含非法格式的依赖声明:

问题描述

text
Copy
Edit
PyYAML (>=5.1.*)
          ~~~~~~^

pip 的提示如下:

javascript
Copy
Edit
.* suffix can only be used with `==` or `!=` operators
Please use pip<24.1 if you need to use this version.

同时导致依赖 omegaconf<2.1 的包(如 fairseq==0.12.2)无法安装,报错如下:

vbnet
Copy
Edit
ERROR: Cannot install -r requirements.txt and fairseq because these package versions have conflicting dependencies.
The conflict is caused by:
    fairseq 0.12.2 depends on omegaconf<2.1
    hydra-core 1.0.7 depends on omegaconf<2.1 and >=2.0.5

问题分析

omegaconf==2.0.5 和 2.0.6 会被 pip 直接忽略;

导致依赖它们的项目安装失败。

可行的解决方案

降级 pip:

pip install "pip<24.1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant