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

collision between python3Packages.dm-haiku and python3Packages.ml-collections #238094

Open
natsukium opened this issue Jun 16, 2023 · 0 comments
Open
Labels

Comments

@natsukium
Copy link
Member

Describe the bug

Creating a python env containing dm-haiku and ml-collections causes conflicts in site-packages/docs/conf.py.

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix-shell -p 'python3.withPackages(ps: with ps; [ml-collections dm-haiku])'
  2. The following error occurs.
error: collision between `/nix/store/qf6dgxfvz52bwg5nr8k7if1bsn2s3hsm-python3.10-dm-haiku-0.0.9/lib/python3.10/site-packages/docs/conf.py' and `/nix/store/n50rsvnzckm2vmqr6hrwpb6v4w17k8sz-python3.10-ml-collections-0.1.1/lib/python3.10/site-packages/docs/conf.py'

Expected behavior

get into nix-shell

Screenshots

Additional context

Looking into the setup.py of these two packages, I found that they use find_namespace_packages() instead of find_packages(), so that the source "docs/" is (unintentionally?) included in the "site-packages".

https://github.com/deepmind/dm-haiku/blob/4b0401225221c2fba092903edfab15fc6e102642/setup.py#L49

https://github.com/google/ml_collections/blob/5cddb7e6dec24acf0f7e1d971fdd94422bd1065d/setup.py#L40

Note that there are 1178 python3 libraries in my nix store, although there are duplicates, and there are the only two that included docs in the site-packages.

I checked with these commands.
echo /nix/store/*python3*/lib/python3*/site-packages | xargs -n 1 | wc -l
fd conf.py /nix/store/*python3*/lib/python3*/site-packages/docs

Notify maintainers

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
 - host os: `Linux 5.15.90.1-microsoft-standard-WSL2, NixOS, 23.11 (Tapir), 23.11.20230611.db08187`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.15.1`
 - channels(root): `"nixos"`
 - channels(natsukium): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant