dask / crick

Streaming and approximate algorithms. WIP, use at own risk.
BSD 3-Clause "New" or "Revised" License
24 stars 17 forks source link

Installing crick with Poetry fails #34

Closed hayesgb closed 11 months ago

hayesgb commented 1 year ago

Python=3.10 dask==2022.12.1 distributed==2022.12.1

Attempting to install crick fails with:

  CalledProcessError

  Command '['/Users/greghayes/Documents/projects/coiled-from-prefect/.venv/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/Users/greghayes/Documents/projects/coiled-from-prefect/.venv', '--no-deps', '/Users/greghayes/Library/Caches/pypoetry/artifacts/2c/24/ef/e6dd7679e15fe2c56b211dbdde50eba7b96e80686651bc23c7871b3790/crick-0.0.3.tar.gz']' returned non-zero exit status 1.

  at /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py:526 in run
       522│             # We don't call process.wait() as .__exit__ does that for us.
       523│             raise
       524│         retcode = process.poll()
       525│         if check and retcode:
    →  526│             raise CalledProcessError(retcode, process.args,
       527│                                      output=stdout, stderr=stderr)
       528│     return CompletedProcess(process.args, retcode, stdout, stderr)
       529│
       530│

The following error occurred when trying to handle this error:

  EnvCommandError

  Command ['/Users/greghayes/Documents/projects/coiled-from-prefect/.venv/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/Users/greghayes/Documents/projects/coiled-from-prefect/.venv', '--no-deps', '/Users/greghayes/Library/Caches/pypoetry/artifacts/2c/24/ef/e6dd7679e15fe2c56b211dbdde50eba7b96e80686651bc23c7871b3790/crick-0.0.3.tar.gz'] errored with the following return code 1, and output:
  Processing /Users/greghayes/Library/Caches/pypoetry/artifacts/2c/24/ef/e6dd7679e15fe2c56b211dbdde50eba7b96e80686651bc23c7871b3790/crick-0.0.3.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    error: subprocess-exited-with-error

    × Getting requirements to build wheel did not run successfully.
    │ exit code: 1
    ╰─> [17 lines of output]
        Traceback (most recent call last):
          File "/Users/greghayes/Documents/projects/coiled-from-prefect/.venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
            main()
          File "/Users/greghayes/Documents/projects/coiled-from-prefect/.venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
            json_out['return_val'] = hook(**hook_input['kwargs'])
          File "/Users/greghayes/Documents/projects/coiled-from-prefect/.venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
            return hook(config_settings)
          File "/private/var/folders/b5/f_y899x168j7cs2m7szjld5c0000gn/T/pip-build-env-4nibap4h/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
            return self._get_build_requires(config_settings, requirements=['wheel'])
          File "/private/var/folders/b5/f_y899x168j7cs2m7szjld5c0000gn/T/pip-build-env-4nibap4h/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
            self.run_setup()
          File "/private/var/folders/b5/f_y899x168j7cs2m7szjld5c0000gn/T/pip-build-env-4nibap4h/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 484, in run_setup
            super(_BuildMetaLegacyBackend,
          File "/private/var/folders/b5/f_y899x168j7cs2m7szjld5c0000gn/T/pip-build-env-4nibap4h/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
            exec(code, locals())
          File "<string>", line 4, in <module>
        ModuleNotFoundError: No module named 'numpy'
        [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 wheel 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.

  at ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/env.py:1540 in _run
      1536│                 output = subprocess.check_output(
      1537│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
      1538│                 )
      1539│         except CalledProcessError as e:
    → 1540│             raise EnvCommandError(e, input=input_)
      1541│
      1542│         return decode(output)
      1543│
      1544│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:

  PoetryException

  Failed to install /Users/greghayes/Library/Caches/pypoetry/artifacts/2c/24/ef/e6dd7679e15fe2c56b211dbdde50eba7b96e80686651bc23c7871b3790/crick-0.0.3.tar.gz

  at ~/Library/Application Support/pypoetry/venv/lib/python3.10/site-packages/poetry/utils/pip.py:58 in pip_install
       54│
       55│     try:
       56│         return environment.run_pip(*args)
       57│     except EnvCommandError as e:
    →  58│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
jrbourbeau commented 1 year ago

Thanks for the issue @hayesgb. It looks like numpy and cython aren't specified as build dependencies, even though they're using during the build process. I've included them over in https://github.com/dask/crick/pull/35 as part of the upcoming release

milesgranger commented 1 year ago

Hi, can you verify v0.0.4 works for you?

milesgranger commented 11 months ago

Going to close this, assuming it's been fixed from recent updates to pyproject.toml and setup.py impls. Please re-open if this is not the case. :)