Skip to content

Unable to install omegaconf (latest, 2.2.3, >2.0.0), python 3.11, 3.10, antlr4-python3-runtime failed #1181

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
de-served opened this issue Jul 5, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@de-served
Copy link

de-served commented Jul 5, 2024

I need to install omegaconf latest or 2.2.3, but have an issues installing it.
Latest omegaconf requests antlr4-python3-runtime version 4.9.* that fails to install
Installing antlr4-python3-runtime successfully installs 4.13.1, but not 4.9.*

Tried python 3.11, 3.10
Tried upgraded pip/setuptools to latest and downgraded setuptools to 68

Tried omegaconf:

omegaconf==2.3 (asks antlr4-python3-runtime==4.9.* (from omegaconf==2.3->-r requirements.txt (line 6)))
omegaconf<2.3 (antlr4-python3-runtime==4.9.* (from omegaconf<2.3->-r requirements.txt (line 6)))
omegaconf<2.2 (antlr4-python3-runtime==4.8 (from omegaconf<2.2->-r requirements.txt (line 6)))
omegaconf<2.1 (only 2.0.0 installed, all other versions "has invalid metadata")

Tried all versions of antlr4-python3-runtime:

antlr4-python3-runtime==4.9.3
antlr4-python3-runtime<4.9
antlr4-python3-runtime<4.8
antlr4-python3-runtime<4.7
antlr4-python3-runtime<4.5
  1. Create a virtual environment (my default python is 3.11) python.exe -m venv .\venv or D:\Dev\Python\3.10\python.exe -m venv .\venv (my secondary python 3.10)
  2. Activate venv: venv\Scripts\activate.bat
  3. (can be skipped) python -m pip install --upgrade pip setuptools
  4. create requirements.txt with omegaconf line (not direct command because different versions tried)
  5. run python -m pip install -r requirements.txt - ERROR: Failed to build installable wheels for some pyproject.toml based projects (antlr4-python3-runtime)
  6. edit requirements.txt to omegaconf<2.3, repeat №5 - same error
  7. repeat №6, changing 2.3 to 2.2, 2.1 - same errors except that version 2.0.0 was installed

Console logs attached:
1. 3.11 venv setup.log.txt
2. 3.11 venv omegaconf setup.log.txt
3. 3.11 venv omegaconf==2.2.3 setup.log.txt
4. 3.11 venv antlr4-python3-runtime setup.log.txt
5. 3.11 venv omegaconf setup.log.txt
6. 3.11 venv antlr4-python3-runtime==4.9.3 setup.log.txt

@de-served de-served added the bug Something isn't working label Jul 5, 2024
@de-served
Copy link
Author

Upd: found that filename/directory containing allowed "$" symbol leads to fail.

@omry
Copy link
Owner

omry commented Jul 15, 2024

Please provide minimal repro instructions.
Please note that OmegaConf 2.4 dev releases no longer depends on antlr (they contains a vendored copy if it) which may help your problem.

@swertz
Copy link

swertz commented Aug 2, 2024

Please note that OmegaConf 2.4 dev releases no longer depends on antlr (they contains a vendored copy if it) which may help your problem.

Perhaps it would be time to release the new version?

@clumsy
Copy link

clumsy commented Mar 28, 2025

When antlr4-python3-runtime==4.9.3 had SERIALIZED_VERSION=3 OmegaConf's compiled lexer was working, but in 4.11.1+ it's set to 4.

File "/opt/conda/lib/python3.12/site-packages/antlr4/atn/ATNDeserializer.py", line 28, in deserialize
    self.checkVersion()
  File "/opt/conda/lib/python3.12/site-packages/antlr4/atn/ATNDeserializer.py", line 50, in checkVersion
    raise Exception("Could not deserialize ATN with version " + str(version) + " (expected " + str(SERIALIZED_VERSION) + ").")
 Exception: Could not deserialize ATN with version  (expected 4).

I believe this was fixed in #1114 but not yet released, right @omry ?

Meanwhile this should be fixable by using version pinning/upper bound on antlr4-python3-runtime==4.9.3.
E.g: pip install omegaconf antlr4-python3-runtime==4.9.3

@astrojuanlu
Copy link

@clumsy there's a dev version on PyPI already, it's the best we have https://pypi.org/project/omegaconf/2.4.0.dev3/

@benieric
Copy link

When will the final prod 2.4.0 version be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants