Skip to content
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

A package without extras conflicts with the same package with extras #552

Open
Atry opened this issue Apr 12, 2023 · 0 comments
Open

A package without extras conflicts with the same package with extras #552

Atry opened this issue Apr 12, 2023 · 0 comments

Comments

@Atry
Copy link
Contributor

Atry commented Apr 12, 2023

This bug can be reproduced by checking out https://github.com/Atry/mach-nix-bug-report

When I build a Python environment with both gradio and rich in requirements, I encountered the following error:

git checkout https://github.com/Atry/mach-nix-bug-report.git && cd mach-nix-bug-report && nix build .#pythonEnvWithGradioAndRich
trace: 
applying fix 'remove-patches' (patches) for httpx:0.23.3

error: builder for '/nix/store/mmm1vpvzj9dci92lnv83cfr63cq9ligf-python3.9-gradio-3.25.0.drv' failed with exit code 1;
       last 10 log lines:
       > Requirement already satisfied: filelock in /nix/store/2pjx2dgjd7ljk629ivphc6w8z21da2a0-python3.9-filelock-3.11.0/lib/python3.9/site-packages (from huggingface-hub>=0.13.0->gradio==3.25.0) (3.11.0)
       > Requirement already satisfied: mdurl~=0.1 in /nix/store/amr6n1r6dqmlcypk24k92zrjaf8h7yfl-python3.9-mdurl-0.1.2/lib/python3.9/site-packages (from markdown-it-py[linkify]>=2.0.0->gradio==3.25.0) (0.1.2)
       > INFO: pip is looking at multiple versions of huggingface-hub to determine which version is compatible with other requirements. This could take a while.
       > INFO: pip is looking at multiple versions of gradio-client to determine which version is compatible with other requirements. This could take a while.
       > INFO: pip is looking at multiple versions of altair to determine which version is compatible with other requirements. This could take a while.
       > INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
       > INFO: pip is looking at multiple versions of gradio to determine which version is compatible with other requirements. This could take a while.
       > ERROR: Could not find a version that satisfies the requirement linkify-it-py<3,>=1; extra == "linkify" (from markdown-it-py[linkify]) (from versions: none)
       > ERROR: No matching distribution found for linkify-it-py<3,>=1; extra == "linkify"
       > 
       For full logs, run 'nix log /nix/store/mmm1vpvzj9dci92lnv83cfr63cq9ligf-python3.9-gradio-3.25.0.drv'.
error: 1 dependencies of derivation '/nix/store/jx4cfa7g857pjfry5nya24cf2hg7y8w0-python3-3.9.16-env.drv' failed to build

However, if the requirements only includes one of gradio or rich, nix build would succeed with no error.

nix build .#pythonEnvWithGradio
nix build .#pythonEnvWithRich

Related dependencies

  • gradio depends on markdown-it-py[linkify]
  • rich depends on markdown-it-py
  • markdown-it-py[linkify] depends on linkify-it-py

Workaround

Add providers.markdown-it-py = "sdist"; would suppress the error

nix build .#pythonEnvWithGradioAndRichWorkaround
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