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

Can't install horovod with poetry 1.2.2 #6899

Closed
4 tasks done
itsdani opened this issue Oct 27, 2022 · 7 comments
Closed
4 tasks done

Can't install horovod with poetry 1.2.2 #6899

itsdani opened this issue Oct 27, 2022 · 7 comments
Labels
area/build-system Related to PEP 517 packaging (see poetry-core) kind/bug Something isn't working as expected status/external-issue Issue is caused by external project (platform, dep, etc)

Comments

@itsdani
Copy link

itsdani commented Oct 27, 2022

pyproject.toml
[tool.poetry]
name = "horovodtest"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.10"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

Horovod cannot be installed with the latest poetry version.
On a newly initialized poetry project poetry add horovod fails.
If I manually run the pip command it shows in the output, it also fails.

However poetry shell and pip install horovod successfully installs the package.
Install is also successful with poetry add horovod when using poetry 1.1.15.

The output of poetry add horovod -vvv --no-cache:

output
Loading configuration file /home/dsegesdi/.config/pypoetry/config.toml
Loading configuration file /home/dsegesdi/.config/pypoetry/auth.toml
Disabling source caches
Creating virtualenv horovodtest in /home/dsegesdi/work/horovodtest/.venv
Using virtualenv: /home/dsegesdi/work/horovodtest/.venv
Using version ^0.26.1 for horovod

Updating dependencies
Resolving dependencies...
   1: fact: horovodtest is 0.1.0
   1: derived: horovodtest
   1: fact: horovodtest depends on horovod (^0.26.1)
   1: selecting horovodtest (0.1.0)
   1: derived: horovod (>=0.26.1,<0.27.0)
   1: fact: horovod (0.26.1) depends on cloudpickle (*)
   1: fact: horovod (0.26.1) depends on psutil (*)
   1: fact: horovod (0.26.1) depends on pyyaml (*)
   1: fact: horovod (0.26.1) depends on packaging (*)
   1: fact: horovod (0.26.1) depends on cffi (>=1.4.0)
   1: selecting horovod (0.26.1)
   1: derived: cffi (>=1.4.0)
   1: derived: packaging
   1: derived: pyyaml
   1: derived: psutil
   1: derived: cloudpickle
   1: selecting pyyaml (6.0)
   1: fact: cffi (1.15.1) depends on pycparser (*)
   1: selecting cffi (1.15.1)
   1: derived: pycparser
   1: selecting pycparser (2.21)
   1: selecting cloudpickle (2.2.0)
   1: fact: packaging (21.3) depends on pyparsing (>=2.0.2,<3.0.5 || >3.0.5)
   1: selecting packaging (21.3)
   1: derived: pyparsing (>=2.0.2,!=3.0.5)
   1: selecting pyparsing (3.0.9)
   1: selecting psutil (5.9.3)
   1: Version solving took 12.439 seconds.
   1: Tried 1 solutions.

Writing lock file

Finding the necessary packages for the current system

Package operations: 8 installs, 0 updates, 0 removals

  • Installing pycparser (2.21): Pending...
  • Installing pycparser (2.21): Installing...
  • Installing pycparser (2.21)
  • Installing pyparsing (3.0.9): Pending...
  • Installing pyparsing (3.0.9): Installing...
  • Installing pyparsing (3.0.9)
  • Installing cffi (1.15.1): Pending...
  • Installing cffi (1.15.1): Installing...
  • Installing cffi (1.15.1)
  • Installing cloudpickle (2.2.0): Pending...
  • Installing cloudpickle (2.2.0): Installing...
  • Installing cloudpickle (2.2.0)
  • Installing packaging (21.3): Pending...
  • Installing packaging (21.3): Installing...
  • Installing packaging (21.3)
  • Installing psutil (5.9.3): Pending...
  • Installing psutil (5.9.3): Installing...
  • Installing psutil (5.9.3)
  • Installing pyyaml (6.0): Pending...
  • Installing pyyaml (6.0): Installing...
  • Installing pyyaml (6.0)
  • Installing horovod (0.26.1): Pending...
  • Installing horovod (0.26.1): Installing...
  • Installing horovod (0.26.1): Failed

  Stack trace:

  2  ~/.pyenv/versions/3.10.7/lib/python3.10/site-packages/poetry/utils/env.py:1472 in _run
      1470│                 )
      1471│             else:
    → 1472│                 output = subprocess.check_output(
      1473│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
      1474│                 )

  1  ~/.pyenv/versions/3.10.7/lib/python3.10/subprocess.py:420 in check_output
       418│         kwargs['input'] = empty
       419│ 
    →  420│     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
       421│                **kwargs).stdout
       422│ 

  CalledProcessError

  Command '['/home/dsegesdi/work/horovodtest/.venv/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/home/dsegesdi/work/horovodtest/.venv', '--no-deps', '/home/dsegesdi/.cache/pypoetry/artifacts/22/3f/52/5ac958d5d9895637e320ab9c30f2728b984c4e6220527a35a0078abf96/horovod-0.26.1.tar.gz']' returned non-zero exit status 1.

  at ~/.pyenv/versions/3.10.7/lib/python3.10/subprocess.py:524 in run
       520│             # We don't call process.wait() as .__exit__ does that for us.
       521│             raise
       522│         retcode = process.poll()
       523│         if check and retcode:
    →  524│             raise CalledProcessError(retcode, process.args,
       525│                                      output=stdout, stderr=stderr)
       526│     return CompletedProcess(process.args, retcode, stdout, stderr)
       527│ 
       528│ 

The following error occurred when trying to handle this error:


  Stack trace:

  3  ~/.pyenv/versions/3.10.7/lib/python3.10/site-packages/poetry/utils/pip.py:49 in pip_install
       47│ 
       48│     try:
    →  49│         return environment.run_pip(*args)
       50│     except EnvCommandError as e:
       51│         raise PoetryException(f"Failed to install {path.as_posix()}") from e

  2  ~/.pyenv/versions/3.10.7/lib/python3.10/site-packages/poetry/utils/env.py:1435 in run_pip
      1433│         pip = self.get_pip_command()
      1434│         cmd = pip + list(args)
    → 1435│         return self._run(cmd, **kwargs)
      1436│ 
      1437│     def run_python_script(self, content: str, **kwargs: Any) -> int | str:

  1  ~/.pyenv/versions/3.10.7/lib/python3.10/site-packages/poetry/utils/env.py:1712 in _run
      1710│     def _run(self, cmd: list[str], **kwargs: Any) -> int | str:
      1711│         kwargs["env"] = self.get_temp_environ(environ=kwargs.get("env"))
    → 1712│         return super()._run(cmd, **kwargs)
      1713│ 
      1714│     def get_temp_environ(

  EnvCommandError

  Command ['/home/dsegesdi/work/horovodtest/.venv/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--prefix', '/home/dsegesdi/work/horovodtest/.venv', '--no-deps', '/home/dsegesdi/.cache/pypoetry/artifacts/22/3f/52/5ac958d5d9895637e320ab9c30f2728b984c4e6220527a35a0078abf96/horovod-0.26.1.tar.gz'] errored with the following return code 1, and output: 
  Processing /home/dsegesdi/.cache/pypoetry/artifacts/22/3f/52/5ac958d5d9895637e320ab9c30f2728b984c4e6220527a35a0078abf96/horovod-0.26.1.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: horovod
    Building wheel for horovod (pyproject.toml): started
    Building wheel for horovod (pyproject.toml): finished with status 'error'
    error: subprocess-exited-with-error
    
    × Building wheel for horovod (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [236 lines of output]
        running bdist_wheel
        running build
        running build_py
        creating build
        creating build/lib.linux-x86_64-cpython-310
        creating build/lib.linux-x86_64-cpython-310/horovod
        copying horovod/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod
        creating build/lib.linux-x86_64-cpython-310/horovod/torch
        copying horovod/torch/sync_batch_norm.py -> build/lib.linux-x86_64-cpython-310/horovod/torch
        copying horovod/torch/optimizer.py -> build/lib.linux-x86_64-cpython-310/horovod/torch
        copying horovod/torch/mpi_ops.py -> build/lib.linux-x86_64-cpython-310/horovod/torch
        copying horovod/torch/functions.py -> build/lib.linux-x86_64-cpython-310/horovod/torch
        copying horovod/torch/compression.py -> build/lib.linux-x86_64-cpython-310/horovod/torch
        copying horovod/torch/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/torch
        creating build/lib.linux-x86_64-cpython-310/horovod/tensorflow
        copying horovod/tensorflow/util.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow
        copying horovod/tensorflow/sync_batch_norm.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow
        copying horovod/tensorflow/mpi_ops.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow
        copying horovod/tensorflow/gradient_aggregation_eager.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow
        copying horovod/tensorflow/gradient_aggregation.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow
        copying horovod/tensorflow/functions.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow
        copying horovod/tensorflow/elastic.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow
        copying horovod/tensorflow/compression.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow
        copying horovod/tensorflow/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow
        creating build/lib.linux-x86_64-cpython-310/horovod/spark
        copying horovod/spark/runner.py -> build/lib.linux-x86_64-cpython-310/horovod/spark
        copying horovod/spark/mpi_run.py -> build/lib.linux-x86_64-cpython-310/horovod/spark
        copying horovod/spark/gloo_run.py -> build/lib.linux-x86_64-cpython-310/horovod/spark
        copying horovod/spark/conf.py -> build/lib.linux-x86_64-cpython-310/horovod/spark
        copying horovod/spark/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/spark
        creating build/lib.linux-x86_64-cpython-310/horovod/runner
        copying horovod/runner/task_fn.py -> build/lib.linux-x86_64-cpython-310/horovod/runner
        copying horovod/runner/run_task.py -> build/lib.linux-x86_64-cpython-310/horovod/runner
        copying horovod/runner/mpi_run.py -> build/lib.linux-x86_64-cpython-310/horovod/runner
        copying horovod/runner/launch.py -> build/lib.linux-x86_64-cpython-310/horovod/runner
        copying horovod/runner/js_run.py -> build/lib.linux-x86_64-cpython-310/horovod/runner
        copying horovod/runner/gloo_run.py -> build/lib.linux-x86_64-cpython-310/horovod/runner
        copying horovod/runner/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/runner
        creating build/lib.linux-x86_64-cpython-310/horovod/ray
        copying horovod/ray/worker.py -> build/lib.linux-x86_64-cpython-310/horovod/ray
        copying horovod/ray/utils.py -> build/lib.linux-x86_64-cpython-310/horovod/ray
        copying horovod/ray/strategy.py -> build/lib.linux-x86_64-cpython-310/horovod/ray
        copying horovod/ray/runner.py -> build/lib.linux-x86_64-cpython-310/horovod/ray
        copying horovod/ray/ray_logger.py -> build/lib.linux-x86_64-cpython-310/horovod/ray
        copying horovod/ray/elastic_v2.py -> build/lib.linux-x86_64-cpython-310/horovod/ray
        copying horovod/ray/elastic.py -> build/lib.linux-x86_64-cpython-310/horovod/ray
        copying horovod/ray/driver_service.py -> build/lib.linux-x86_64-cpython-310/horovod/ray
        copying horovod/ray/adapter.py -> build/lib.linux-x86_64-cpython-310/horovod/ray
        copying horovod/ray/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/ray
        creating build/lib.linux-x86_64-cpython-310/horovod/mxnet
        copying horovod/mxnet/mpi_ops.py -> build/lib.linux-x86_64-cpython-310/horovod/mxnet
        copying horovod/mxnet/functions.py -> build/lib.linux-x86_64-cpython-310/horovod/mxnet
        copying horovod/mxnet/compression.py -> build/lib.linux-x86_64-cpython-310/horovod/mxnet
        copying horovod/mxnet/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/mxnet
        creating build/lib.linux-x86_64-cpython-310/horovod/keras
        copying horovod/keras/elastic.py -> build/lib.linux-x86_64-cpython-310/horovod/keras
        copying horovod/keras/callbacks.py -> build/lib.linux-x86_64-cpython-310/horovod/keras
        copying horovod/keras/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/keras
        creating build/lib.linux-x86_64-cpython-310/horovod/data
        copying horovod/data/data_loader_base.py -> build/lib.linux-x86_64-cpython-310/horovod/data
        copying horovod/data/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/data
        creating build/lib.linux-x86_64-cpython-310/horovod/common
        copying horovod/common/util.py -> build/lib.linux-x86_64-cpython-310/horovod/common
        copying horovod/common/process_sets.py -> build/lib.linux-x86_64-cpython-310/horovod/common
        copying horovod/common/exceptions.py -> build/lib.linux-x86_64-cpython-310/horovod/common
        copying horovod/common/elastic.py -> build/lib.linux-x86_64-cpython-310/horovod/common
        copying horovod/common/basics.py -> build/lib.linux-x86_64-cpython-310/horovod/common
        copying horovod/common/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/common
        creating build/lib.linux-x86_64-cpython-310/horovod/_keras
        copying horovod/_keras/elastic.py -> build/lib.linux-x86_64-cpython-310/horovod/_keras
        copying horovod/_keras/callbacks.py -> build/lib.linux-x86_64-cpython-310/horovod/_keras
        copying horovod/_keras/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/_keras
        creating build/lib.linux-x86_64-cpython-310/horovod/torch/elastic
        copying horovod/torch/elastic/state.py -> build/lib.linux-x86_64-cpython-310/horovod/torch/elastic
        copying horovod/torch/elastic/sampler.py -> build/lib.linux-x86_64-cpython-310/horovod/torch/elastic
        copying horovod/torch/elastic/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/torch/elastic
        creating build/lib.linux-x86_64-cpython-310/horovod/tensorflow/keras
        copying horovod/tensorflow/keras/elastic.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow/keras
        copying horovod/tensorflow/keras/callbacks.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow/keras
        copying horovod/tensorflow/keras/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow/keras
        creating build/lib.linux-x86_64-cpython-310/horovod/tensorflow/data
        copying horovod/tensorflow/data/compute_worker.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow/data
        copying horovod/tensorflow/data/compute_service.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow/data
        copying horovod/tensorflow/data/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/tensorflow/data
        creating build/lib.linux-x86_64-cpython-310/horovod/spark/torch
        copying horovod/spark/torch/util.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/torch
        copying horovod/spark/torch/remote.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/torch
        copying horovod/spark/torch/estimator.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/torch
        copying horovod/spark/torch/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/torch
        creating build/lib.linux-x86_64-cpython-310/horovod/spark/tensorflow
        copying horovod/spark/tensorflow/compute_worker.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/tensorflow
        copying horovod/spark/tensorflow/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/tensorflow
        creating build/lib.linux-x86_64-cpython-310/horovod/spark/task
        copying horovod/spark/task/task_service.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/task
        copying horovod/spark/task/task_info.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/task
        copying horovod/spark/task/mpirun_exec_fn.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/task
        copying horovod/spark/task/gloo_exec_fn.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/task
        copying horovod/spark/task/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/task
        creating build/lib.linux-x86_64-cpython-310/horovod/spark/lightning
        copying horovod/spark/lightning/util.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/lightning
        copying horovod/spark/lightning/remote.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/lightning
        copying horovod/spark/lightning/legacy.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/lightning
        copying horovod/spark/lightning/estimator.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/lightning
        copying horovod/spark/lightning/datamodule.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/lightning
        copying horovod/spark/lightning/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/lightning
        creating build/lib.linux-x86_64-cpython-310/horovod/spark/keras
        copying horovod/spark/keras/util.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/keras
        copying horovod/spark/keras/tensorflow.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/keras
        copying horovod/spark/keras/remote.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/keras
        copying horovod/spark/keras/optimizer.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/keras
        copying horovod/spark/keras/estimator.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/keras
        copying horovod/spark/keras/datamodule.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/keras
        copying horovod/spark/keras/bare.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/keras
        copying horovod/spark/keras/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/keras
        creating build/lib.linux-x86_64-cpython-310/horovod/spark/driver
        copying horovod/spark/driver/rsh.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/driver
        copying horovod/spark/driver/rendezvous.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/driver
        copying horovod/spark/driver/mpirun_rsh.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/driver
        copying horovod/spark/driver/job_id.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/driver
        copying horovod/spark/driver/host_discovery.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/driver
        copying horovod/spark/driver/driver_service.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/driver
        copying horovod/spark/driver/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/driver
        creating build/lib.linux-x86_64-cpython-310/horovod/spark/data_loaders
        copying horovod/spark/data_loaders/pytorch_data_loaders.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/data_loaders
        copying horovod/spark/data_loaders/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/data_loaders
        creating build/lib.linux-x86_64-cpython-310/horovod/spark/common
        copying horovod/spark/common/util.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/common
        copying horovod/spark/common/store.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/common
        copying horovod/spark/common/serialization.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/common
        copying horovod/spark/common/params.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/common
        copying horovod/spark/common/estimator.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/common
        copying horovod/spark/common/datamodule.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/common
        copying horovod/spark/common/constants.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/common
        copying horovod/spark/common/cache.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/common
        copying horovod/spark/common/backend.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/common
        copying horovod/spark/common/_namedtuple_fix.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/common
        copying horovod/spark/common/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/spark/common
        creating build/lib.linux-x86_64-cpython-310/horovod/runner/util
        copying horovod/runner/util/threads.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/util
        copying horovod/runner/util/streams.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/util
        copying horovod/runner/util/remote.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/util
        copying horovod/runner/util/network.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/util
        copying horovod/runner/util/lsf.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/util
        copying horovod/runner/util/cache.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/util
        copying horovod/runner/util/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/util
        creating build/lib.linux-x86_64-cpython-310/horovod/runner/task
        copying horovod/runner/task/task_service.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/task
        copying horovod/runner/task/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/task
        creating build/lib.linux-x86_64-cpython-310/horovod/runner/http
        copying horovod/runner/http/http_server.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/http
        copying horovod/runner/http/http_client.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/http
        copying horovod/runner/http/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/http
        creating build/lib.linux-x86_64-cpython-310/horovod/runner/elastic
        copying horovod/runner/elastic/worker.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/elastic
        copying horovod/runner/elastic/settings.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/elastic
        copying horovod/runner/elastic/rendezvous.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/elastic
        copying horovod/runner/elastic/registration.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/elastic
        copying horovod/runner/elastic/driver.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/elastic
        copying horovod/runner/elastic/discovery.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/elastic
        copying horovod/runner/elastic/constants.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/elastic
        copying horovod/runner/elastic/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/elastic
        creating build/lib.linux-x86_64-cpython-310/horovod/runner/driver
        copying horovod/runner/driver/driver_service.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/driver
        copying horovod/runner/driver/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/driver
        creating build/lib.linux-x86_64-cpython-310/horovod/runner/common
        copying horovod/runner/common/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common
        creating build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/tiny_shell_exec.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/timeout.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/settings.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/secret.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/safe_shell_exec.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/network.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/hosts.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/host_hash.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/env.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/config_parser.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/codec.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        copying horovod/runner/common/util/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/util
        creating build/lib.linux-x86_64-cpython-310/horovod/runner/common/service
        copying horovod/runner/common/service/task_service.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/service
        copying horovod/runner/common/service/driver_service.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/service
        copying horovod/runner/common/service/compute_service.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/service
        copying horovod/runner/common/service/__init__.py -> build/lib.linux-x86_64-cpython-310/horovod/runner/common/service
        running build_ext
        Traceback (most recent call last):
          File "/home/dsegesdi/work/horovodtest/.venv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
            main()
          File "/home/dsegesdi/work/horovodtest/.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 "/home/dsegesdi/work/horovodtest/.venv/lib/python3.10/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-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 412, in build_wheel
            return self._build_with_temp_dir(['bdist_wheel'], '.whl',
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir
            self.run_setup()
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 483, in run_setup
            super(_BuildMetaLegacyBackend,
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 335, in run_setup
            exec(code, locals())
          File "<string>", line 213, in <module>
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
            return distutils.core.setup(**attrs)
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
            return run_commands(dist)
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
            dist.run_commands()
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 968, in run_commands
            self.run_command(cmd)
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
            super().run_command(command)
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
            cmd_obj.run()
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 299, in run
            self.run_command('build')
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
            self.distribution.run_command(command)
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
            super().run_command(command)
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
            cmd_obj.run()
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
            self.run_command(cmd_name)
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
            self.distribution.run_command(command)
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
            super().run_command(command)
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
            cmd_obj.run()
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 84, in run
            _build_ext.run(self)
          File "/tmp/pip-build-env-rbzyecma/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
            self.build_extensions()
          File "<string>", line 106, in build_extensions
          File "<string>", line 67, in get_cmake_bin
        ModuleNotFoundError: No module named 'packaging'
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for horovod
  Failed to build horovod
  ERROR: Could not build wheels for horovod, which is required to install pyproject.toml-based projects
  

  at ~/.pyenv/versions/3.10.7/lib/python3.10/site-packages/poetry/utils/env.py:1476 in _run
      1472│                 output = subprocess.check_output(
      1473│                     command, stderr=subprocess.STDOUT, env=env, **kwargs
      1474│                 )
      1475│         except CalledProcessError as e:
    → 1476│             raise EnvCommandError(e, input=input_)
      1477│ 
      1478│         return decode(output)
      1479│ 
      1480│     def execute(self, bin: str, *args: str, **kwargs: Any) -> int:

The following error occurred when trying to handle this error:


  Stack trace:

  5  ~/.pyenv/versions/3.10.7/lib/python3.10/site-packages/poetry/installation/executor.py:261 in _execute_operation
      259│ 
      260│             try:
    → 261│                 result = self._do_execute_operation(operation)
      262│             except EnvCommandError as e:
      263│                 if e.e.returncode == -2:

  4  ~/.pyenv/versions/3.10.7/lib/python3.10/site-packages/poetry/installation/executor.py:334 in _do_execute_operation
      332│             return 0
      333│ 
    → 334│         result: int = getattr(self, f"_execute_{method}")(operation)
      335│ 
      336│         if result != 0:

  3  ~/.pyenv/versions/3.10.7/lib/python3.10/site-packages/poetry/installation/executor.py:454 in _execute_install
      452│ 
      453│     def _execute_install(self, operation: Install | Update) -> int:
    → 454│         status_code = self._install(operation)
      455│ 
      456│         self._save_url_reference(operation)

  2  ~/.pyenv/versions/3.10.7/lib/python3.10/site-packages/poetry/installation/executor.py:496 in _install
      494│         )
      495│         self._write(operation, message)
    → 496│         return self.pip_install(archive, upgrade=operation.job_type == "update")
      497│ 
      498│     def _update(self, operation: Install | Update) -> int:

  1  ~/.pyenv/versions/3.10.7/lib/python3.10/site-packages/poetry/installation/executor.py:123 in pip_install
      121│     ) -> int:
      122│         try:
    → 123│             pip_install(req, self._env, upgrade=upgrade, editable=editable)
      124│         except EnvCommandError as e:
      125│             output = decode(e.e.output)

  PoetryException

  Failed to install /home/dsegesdi/.cache/pypoetry/artifacts/22/3f/52/5ac958d5d9895637e320ab9c30f2728b984c4e6220527a35a0078abf96/horovod-0.26.1.tar.gz

  at ~/.pyenv/versions/3.10.7/lib/python3.10/site-packages/poetry/utils/pip.py:51 in pip_install
       47│ 
       48│     try:
       49│         return environment.run_pip(*args)
       50│     except EnvCommandError as e:
    →  51│         raise PoetryException(f"Failed to install {path.as_posix()}") from e
       52│ 
@itsdani itsdani added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Oct 27, 2022
@itsdani itsdani changed the title Can't install horovod with poetry 1.2.x Can't install horovod with poetry 1.2.2 Oct 27, 2022
@Secrus
Copy link
Member

Secrus commented Oct 27, 2022

Horovod maintainers don't provide proper means of installation with PEP-517 build isolation. You can see the same effect using pip install --use-pep517 horovod. Please raise the issue in horovod repository

@Secrus Secrus added area/build-system Related to PEP 517 packaging (see poetry-core) status/external-issue Issue is caused by external project (platform, dep, etc) and removed status/triage This issue needs to be triaged labels Oct 27, 2022
@itsdani
Copy link
Author

itsdani commented Oct 27, 2022

Adding some more info to this, so anyone with the same problem can find related things:

There was a similar issue previously, that happened on poetry 1.2.0, with the error ModuleNotFoundError: No module named 'tensorflow' which doesn't happen anymore with poetry 1.2.2. That older issue happened with all recent horovod versions as far as I know.

However the current issue only happens with the most recent horovod versions (0.25.0 works fine, while 0.26.x breaks)
We have raised the issue in horovod repository (linked above this comment)

Update: my issue with No module named 'packaging' originates from the currently closed issue horovod/horovod#3744, which got a partial fix, that doesn't work for --use-pep517

@dimbleby
Copy link
Contributor

not a poetry bug

@neersighted
Copy link
Member

Indeed, not a Poetry issue; Poetry needs to build packages with isolation per PEP 517 turned on for a variety of reasons; the primary being it allows us to manage setuptools as just another package, and the secondary being our (coming) new installer will support PEP 517 isolation only.

@JustASquid
Copy link

Is there any workaround for this? I'm running into this issue.

@itsdani
Copy link
Author

itsdani commented Apr 25, 2023

poetry run pip install horovod
If anyone has a better workaround/solution, that would be great tho...

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/build-system Related to PEP 517 packaging (see poetry-core) kind/bug Something isn't working as expected status/external-issue Issue is caused by external project (platform, dep, etc)
Projects
None yet
Development

No branches or pull requests

5 participants