aetherAI / whole-slide-cnn

This repository provides scripts to reproduce the results in the paper "An annotation-free whole-slide training approach to pathological classification of lung cancer types by deep learning".
Other
61 stars 13 forks source link

packages installation error with poetry #6

Open archanabhardwaj opened 1 year ago

archanabhardwaj commented 1 year ago

Hi I am trying to install pipeline under python 3.9 conda enviroment. I followed these steps : -> poetry install It gives error for installation of dependency pacakges.

Package operations: 35 installs, 7 updates, 0 removals

• Updating importlib-metadata (4.11.4 -> 6.0.0) • Updating numpy (1.18.0 -> 1.18.5) • Updating h5py (3.7.0 -> 2.10.0): Failed

CalledProcessError

Command '['/home/user/.conda/envs/whole2/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/home/user/.conda/envs/whole2', '--upgrade', '--no-deps', '/home/user/.cache/pypoetry/artifacts/67/73/11/59cd898ab55f65d9213500215b00e663dafb02beb2e48301f1ffc078ae/h5py-2.10.0.tar.gz']' returned non-zero exit status 1.

at ~/.conda/envs/whole2/lib/python3.9/subprocess.py:528 in run 524│ # We don't call process.wait() as .exit does that for us. 525│ raise 526│ retcode = process.poll() 527│ if check and retcode: → 528│ raise CalledProcessError(retcode, process.args, 529│ output=stdout, stderr=stderr) 530│ return CompletedProcess(process.args, retcode, stdout, stderr) 531│ 532│

The following error occurred when trying to handle this error:

EnvCommandError

Command ['/home/user/.conda/envs/whole2/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/home/user/.conda/envs/whole2', '--upgrade', '--no-deps', '/home/user/.cache/pypoetry/artifacts/67/73/11/59cd898ab55f65d9213500215b00e663dafb02beb2e48301f1ffc078ae/h5py-2.10.0.tar.gz'] errored with the following return code 1, and output: Processing /home/user/.cache/pypoetry/artifacts/67/73/11/59cd898ab55f65d9213500215b00e663dafb02beb2e48301f1ffc078ae/h5py-2.10.0.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 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Building wheels for collected packages: h5py Building wheel for h5py (pyproject.toml): started Building wheel for h5py (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error

× Building wheel for h5py (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [109 lines of output]
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-cpython-39
    creating build/lib.linux-x86_64-cpython-39/h5py
    copying h5py/__init__.py -> build/lib.linux-x86_64-cpython-39/h5py
    copying h5py/h5py_warnings.py -> build/lib.linux-x86_64-cpython-39/h5py
    copying h5py/highlevel.py -> build/lib.linux-x86_64-cpython-39/h5py
    copying h5py/ipy_completer.py -> build/lib.linux-x86_64-cpython-39/h5py
    copying h5py/version.py -> build/lib.linux-x86_64-cpython-39/h5py
    creating build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/__init__.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/attrs.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/base.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/compat.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/dataset.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/datatype.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/dims.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/files.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/filters.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/group.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/selections.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/selections2.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    copying h5py/_hl/vds.py -> build/lib.linux-x86_64-cpython-39/h5py/_hl
    creating build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/__init__.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/common.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_attribute_create.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_attrs.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_attrs_data.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_base.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_completions.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_dataset.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_dataset_getitem.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_dataset_swmr.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_datatype.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_deprecation.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_dimension_scales.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_dtype.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_file.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_file2.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_file_image.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_filters.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_group.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_h5.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_h5f.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_h5p.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_h5pl.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_h5t.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_objects.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_selections.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_slicing.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    copying h5py/tests/test_threads.py -> build/lib.linux-x86_64-cpython-39/h5py/tests
    creating build/lib.linux-x86_64-cpython-39/h5py/tests/test_vds
    copying h5py/tests/test_vds/__init__.py -> build/lib.linux-x86_64-cpython-39/h5py/tests/test_vds
    copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.linux-x86_64-cpython-39/h5py/tests/test_vds
    copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.linux-x86_64-cpython-39/h5py/tests/test_vds
    copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.linux-x86_64-cpython-39/h5py/tests/test_vds
    running build_ext
    Traceback (most recent call last):
      File "/home/user/.conda/envs/whole2/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
        main()
      File "/home/user/.conda/envs/whole2/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/home/user/.conda/envs/whole2/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 249, in build_wheel
        return _build_backend().build_wheel(wheel_directory, config_settings,
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 413, in build_wheel
        return self._build_with_temp_dir(['bdist_wheel'], '.whl',
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 398, in _build_with_temp_dir
        self.run_setup()
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 484, in run_setup
        super(_BuildMetaLegacyBackend,
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
        exec(code, locals())
      File "<string>", line 140, in <module>
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 87, in setup
        return distutils.core.setup(**attrs)
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 185, in setup
        return run_commands(dist)
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
        dist.run_commands()
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
        self.run_command(cmd)
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1208, in run_command
        super().run_command(command)
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
        cmd_obj.run()
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 325, in run
        self.run_command("build")
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
        self.distribution.run_command(command)
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1208, in run_command
        super().run_command(command)
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
        cmd_obj.run()
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 132, in run
        self.run_command(cmd_name)
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
        self.distribution.run_command(command)
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 1208, in run_command
        super().run_command(command)
      File "/tmp/pip-build-env-empfbsy4/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
        cmd_obj.run()
      File "/tmp/pip-req-build-lrcwoa_e/setup_build.py", line 161, in run
        from Cython.Build import cythonize
    ModuleNotFoundError: No module named 'Cython'
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for h5py

Failed to build h5py ERROR: Could not build wheels for h5py, which is required to install pyproject.toml-based projects

at ~/.conda/envs/whole2/lib/python3.9/site-packages/poetry/utils/env.py:1540 in _run 1536│ output = subprocess.checkoutput( 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 /home/user/.cache/pypoetry/artifacts/67/73/11/59cd898ab55f65d9213500215b00e663dafb02beb2e48301f1ffc078ae/h5py-2.10.0.tar.gz

at ~/.conda/envs/whole2/lib/python3.9/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 59│

It would be great if you can help me to fix this issue.

I would really appreciate your help!!

Thanks in advance