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

make venv fails: error: Multiple top-level packages discovered in a flat-layout: ['api', 'conf', 'figures', 'streamlit', 'image_to_latex'] #20

Open
NightMachinery opened this issue Aug 14, 2022 · 6 comments

Comments

@NightMachinery
Copy link

 ❯ make venv
python3 -m venv venv
source venv/bin/activate && \
	python -m pip install --upgrade pip setuptools wheel && \
	make install-dev
Requirement already satisfied: pip in ./venv/lib/python3.10/site-packages (22.2.2)
Requirement already satisfied: setuptools in ./venv/lib/python3.10/site-packages (64.0.3)
Requirement already satisfied: wheel in ./venv/lib/python3.10/site-packages (0.37.1)
python -m pip install -e ".[dev]" --no-cache-dir
Obtaining file:///Users/evar/Base/_Code/uni/image-to-latex
  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: ['api', 'conf', 'figures', 'streamlit', 'image_to_latex'].
      
      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.
make[1]: *** [install-dev] Error 1
make: *** [venv] Error 2
@haouarihk
Copy link

anyone got a solution for this

haouarihk added a commit to haouarihk/image-to-latex that referenced this issue Sep 11, 2022
this will disable auto discovery for modules
@hulakk
Copy link

hulakk commented Nov 18, 2022

anyone got a solution for this

Thank you! But what do you main?

@mv-stns
Copy link

mv-stns commented Dec 7, 2022

Also getting the error as @NightMachinery mentioned.
CleanShot 2022-12-07 at 10 58 29@2x

Any quickfixes yet?

@Wangyiheng962
Copy link

you could just use‘pip install -r requirements.txt’ to install all requirements.just forget it.But it seems to occur some problem.You need to adjust its version or install some missing packages.

@KhbAs97
Copy link

KhbAs97 commented May 27, 2023

In setup.py: add "py_modules=["image_to_latex","api"]," after install_requires=[required_packages], in end.

@chunyu-li
Copy link

In setup.py: add "py_modules=["image_to_latex","api"]," after install_requires=[required_packages], in end.

This method works

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

7 participants