"error: Multiple top-level packages discovered in a flat-layout: ['hive', 'nrel']."
Closed this issue · 2 comments
while trying to test the new PR #108 i ran into this error. a quick github search implies it is a known issue where setuptools collides with behaviors from other installer frameworks. in this case, i am installing hive into a python venv (aka, not using conda).
update: also happens when installing into fresh conda (py=3.10) environment with latest pip.
the solution may be this or may be to require conda environments if they don't run into this issue.
(venv) rfitzger-36698s:hive rfitzger$ pip install -e .
Obtaining file:///Users/rfitzger/dev/nrel/hive/hive
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... error
error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
error: Multiple top-level packages discovered in a flat-layout: ['hive', 'nrel'].
To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.
If you are trying to create a single distribution with multiple packages
on purpose, you should not rely on automatic discovery.
Instead, consider the following options:
1. set up custom discovery (`find` directive with `include` or `exclude`)
2. use a `src-layout`
3. explicitly set `py_modules` or `packages` with a list of names
To find more information, look for "package discovery" on setuptools docs.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build editable did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
(venv) rfitzger-36698s:hive rfitzger$
Do you get the same error if cloning a fresh repository? I'm wondering if the old top level hive folder is still sitting in the repository and so it's finding that when trying to install?
😮 how did you do that
i didn't realize that was what the error was saying. thanks for your wizard-level sleuthery.