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

[BUG] llvmlite fails building upon pip install #670

Open
blurridge opened this issue Sep 12, 2024 · 4 comments
Open

[BUG] llvmlite fails building upon pip install #670

blurridge opened this issue Sep 12, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@blurridge
Copy link

blurridge commented Sep 12, 2024

Describe the bug
I've tried pip installing both on my docker container and my local machine and llvmlite does not build. Also already tried updating pip

To Reproduce
Steps to reproduce the behavior:

  1. Create an environment with Python 3.10
  2. Pip install rembg

Expected behavior
Successful pip install

Images
Input images to reproduce.

OS Version:
Mac OS Sonoma 14.6.1

Rembg version:
v2.0.59

Additional context

note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for numba
  Building wheel for llvmlite (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for llvmlite (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      running bdist_wheel
      /Users/blurridge/Documents/Coding/fsl-backend/env/bin/python3.10 /private/var/folders/js/n5lc337x5sd6y0sqph8lr6gm0000gn/T/pip-install-gyhwh4ko/llvmlite_ac3d895caafe49ab9a581b2fec787acb/ffi/build.py
      LLVM version... Traceback (most recent call last):
        File "/private/var/folders/js/n5lc337x5sd6y0sqph8lr6gm0000gn/T/pip-install-gyhwh4ko/llvmlite_ac3d895caafe49ab9a581b2fec787acb/ffi/build.py", line 105, in main_posix
          out = subprocess.check_output([llvm_config, '--version'])
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 420, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 501, in run
          with Popen(*popenargs, **kwargs) as process:
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 966, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 1842, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'llvm-config'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/private/var/folders/js/n5lc337x5sd6y0sqph8lr6gm0000gn/T/pip-install-gyhwh4ko/llvmlite_ac3d895caafe49ab9a581b2fec787acb/ffi/build.py", line 191, in <module>
          main()
        File "/private/var/folders/js/n5lc337x5sd6y0sqph8lr6gm0000gn/T/pip-install-gyhwh4ko/llvmlite_ac3d895caafe49ab9a581b2fec787acb/ffi/build.py", line 185, in main
          main_posix('osx', '.dylib')
        File "/private/var/folders/js/n5lc337x5sd6y0sqph8lr6gm0000gn/T/pip-install-gyhwh4ko/llvmlite_ac3d895caafe49ab9a581b2fec787acb/ffi/build.py", line 107, in main_posix
          raise RuntimeError("%s failed executing, please point LLVM_CONFIG "
      RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
      error: command '/Users/blurridge/Documents/Coding/fsl-backend/env/bin/python3.10' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for llvmlite
Failed to build numba llvmlite
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (numba, llvmlite)
@blurridge blurridge added the bug Something isn't working label Sep 12, 2024
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 13, 2024
@haroon423
Copy link

Hi there,

Thank you for reporting the installation issue with rembg. It seems like you're encountering a problem while trying to install llvmlite, which is required for numba, in your environment.

Bug Description: When trying to install rembg using pip in a Python 3.10 environment, the installation fails with the following error messages:

FileNotFoundError: llvm-config not found.
RuntimeError: llvm-config failed executing, indicating that the environment cannot locate the LLVM configuration.
Steps to Reproduce:

Create a virtual environment with Python 3.10.
Attempt to install rembg using pip install rembg.
Environment Details:

OS Version: Mac OS Sonoma 14.6.1
Rembg Version: v2.0.59
Error Output: The error log indicates issues related to llvm-config, which is essential for building llvmlite. The specific error reads:
RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config

Install LLVM: Ensure that LLVM is installed on your system. You can install it using Homebrew:
brew install llvm

@blurridge
Copy link
Author

Hi there,

Thank you for reporting the installation issue with rembg. It seems like you're encountering a problem while trying to install llvmlite, which is required for numba, in your environment.

Bug Description: When trying to install rembg using pip in a Python 3.10 environment, the installation fails with the following error messages:

FileNotFoundError: llvm-config not found. RuntimeError: llvm-config failed executing, indicating that the environment cannot locate the LLVM configuration. Steps to Reproduce:

Create a virtual environment with Python 3.10. Attempt to install rembg using pip install rembg. Environment Details:

OS Version: Mac OS Sonoma 14.6.1 Rembg Version: v2.0.59 Error Output: The error log indicates issues related to llvm-config, which is essential for building llvmlite. The specific error reads: RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config

Install LLVM: Ensure that LLVM is installed on your system. You can install it using Homebrew: brew install llvm

Hello! This does not account for the fact though that it doesn't run on docker since I'm using the python3.10-slim image which is a debian image. Thanks though!

@github-actions github-actions bot removed the stale label Oct 15, 2024
@Youjin1985
Copy link

llvmlite requires at most llvm@10, but sonoma only has llvm@11 and above 😡

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

3 participants