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

"error: Multiple top-level packages discovered in a flat-layout: ['hive', 'nrel']." #109

Closed
robfitzgerald opened this issue Nov 2, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@robfitzgerald
Copy link
Collaborator

robfitzgerald commented Nov 2, 2022

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$ 
@robfitzgerald robfitzgerald added the bug Something isn't working label Nov 2, 2022
@robfitzgerald robfitzgerald changed the title "error: Multiple top-level packages discovered in a flat-layout: ['hive', 'nrel']." while installing into venv "error: Multiple top-level packages discovered in a flat-layout: ['hive', 'nrel']." Nov 2, 2022
@nreinicke
Copy link
Collaborator

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?

@robfitzgerald
Copy link
Collaborator Author

😮 how did you do that

i didn't realize that was what the error was saying. thanks for your wizard-level sleuthery.

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

2 participants