bedapisl / fast-colorthief

Selection of most dominant colors in image using Modified Median Cut Quantization
45 stars 1 forks source link

Install error #38

Closed mmoollllee closed 7 months ago

mmoollllee commented 7 months ago
Installing collected packages: Pillow, fast_colorthief
  DEPRECATION: fast_colorthief is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for fast_colorthief ... error
  error: subprocess-exited-with-error

  × Running setup.py install for fast_colorthief did not run successfully.
  │ exit code: 1
  ╰─> [53 lines of output]
      running install
      running build
      running build_py
      creating build
      creating build/lib.macosx-14.2-arm64-3.9
      copying fast_colorthief.py -> build/lib.macosx-14.2-arm64-3.9
      copying version.py -> build/lib.macosx-14.2-arm64-3.9
      running build_ext
      Traceback (most recent call last):
        File "/private/var/folders/_q/_r0ly1vn5y18g9x2ryh5yghr0000gn/T/pip-install-qq8iizm3/fast-colorthief_fe54f68264ef40f9b83d92e3395f7c87/setup.py", line 28, in run
          out = subprocess.check_output(['cmake', '--version'])
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/subprocess.py", line 424, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/subprocess.py", line 505, in run
          with Popen(*popenargs, **kwargs) as process:
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/subprocess.py", line 951, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/subprocess.py", line 1837, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'cmake'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/_q/_r0ly1vn5y18g9x2ryh5yghr0000gn/T/pip-install-qq8iizm3/fast-colorthief_fe54f68264ef40f9b83d92e3395f7c87/setup.py", line 70, in <module>
          setup(
        File "/Users/mg/dev/api.kuckuck.cam/venv/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
          return distutils.core.setup(**attrs)
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/distutils/core.py", line 148, in setup
          dist.run_commands()
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/distutils/dist.py", line 966, in run_commands
          self.run_command(cmd)
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/Users/mg/dev/api.kuckuck.cam/venv/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
          return orig.install.run(self)
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/distutils/command/install.py", line 546, in run
          self.run_command('build')
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/distutils/command/build.py", line 135, in run
          self.run_command(cmd_name)
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/distutils/cmd.py", line 313, in run_command
          self.distribution.run_command(command)
        File "/Users/mg/.pyenv/versions/3.9.18/lib/python3.9/distutils/dist.py", line 985, in run_command
          cmd_obj.run()
        File "/private/var/folders/_q/_r0ly1vn5y18g9x2ryh5yghr0000gn/T/pip-install-qq8iizm3/fast-colorthief_fe54f68264ef40f9b83d92e3395f7c87/setup.py", line 30, in run
          raise RuntimeError(
      RuntimeError: CMake must be installed to build the following extensions: fast_colorthief_backend
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> fast_colorthief

Happens on current macos on Apple silicon M3..

mmoollllee commented 7 months ago

But not with current python. I'm sorry. Was using python 3.9 With python 3.11 it works :)