DEPRECATION: omegaconf 2.0.6 has a non-standard dependency specifier PyYAML>=5.1.*. pip 24.0 will enforce
🐛 Bug
Installing fairseq pops a deprecation notice related to its requirements.
DEPRECATION: omegaconf 2.0.6 has a non-standard dependency specifier PyYAML>=5.1.*. pip 24.0 will enforce this behaviour change. A possible replacement is to upgrade to a newer version of omegaconf or contact the author to suggest that they release a version with a conforming dependency specifiers. Discussion can be found at https://github.com/pypa/pip/issues/12063
To Reproduce
git clone https://github.com/facebookresearch/fairseq pip install --no-cache-dir fairseq/.
The dependency bug is fixed in version 2.1.1 - but fairseq requires "omegaconf<2.1" in setup.py https://github.com/omry/omegaconf/issues/1107
Environment
- fairseq Version : '0.12.2'
- PyTorch Version: '2.1.2'
- OS (e.g., Linux): Ubuntu 22.04
- How you installed fairseq: source
- Python version: '3.9.18 | packaged by conda-forge | (main, Dec 23 2023, 16:33:10) \n[GCC 12.3.0]'
- CUDA/cuDNN version: 12.1
It seems like this problem is here to stay when you try to install from source, one thing that seemingly worked for me is removing the versioning of:
"hydra-core" and "omegaconf" from "setup.py", "install_requires" list. Yet of course I do not know if this breaks things, those version limitations seem oddly specific, at least I can say it finished building and installing without any error.
i.e.
replace 179-193 with:
install_requires=[
"cffi",
"cython",
"hydra-core",
"omegaconf",
"numpy>=1.21.3",
"regex",
"sacrebleu>=1.4.12",
"torch>=1.13",
"tqdm",
"bitarray",
"torchaudio>=0.8.0",
"scikit-learn",
"packaging",
],
I have the same problem. There doesn't seem to be an immediate problem, but I would like an update.
This very easily breaks docker builds where you are going to have the newer pip by default. I honestly wish there was a fairseq fork that actually resolved the omegaconf, hydra-core, missing wheels and other problems.
For me, it only breaks for pip >=24.1. Once I downgraded pip with python -m pip install --upgrade pip==24.0, the error went away since it's no longer enforcing the omegaconf's non-standard dependency.