Skip to content

Installation Error: Failed to build installable wheels for some pyproject.toml based projects (pendulum) #303

@bennwei

Description

@bennwei

I tried to install PyAirbyte, but installation failed due to pendulum==2.1.2:

poetry add airbyte 
• Installing pendulum (2.1.2): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel
  
  Traceback (most recent call last):
    File "/tmp/tmpe0dmrq00/pendulum-2.1.2/build.py", line 5, in <module>
      from distutils.command.build_ext import build_ext
  ModuleNotFoundError: No module named 'distutils'
  Traceback (most recent call last):
    File "/home/eliao/.local/pipx/venvs/poetry/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/home/eliao/.local/pipx/venvs/poetry/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/eliao/.local/pipx/venvs/poetry/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpqzlbwpex/.venv/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 58, in build_wheel
      return WheelBuilder.make_in(
             ^^^^^^^^^^^^^^^^^^^^^
    File "/tmp/tmpqzlbwpex/.venv/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 88, in make_in
      wb.build(target_dir=directory)
    File "/tmp/tmpqzlbwpex/.venv/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 123, in build
      self._build(zip_file)
    File "/tmp/tmpqzlbwpex/.venv/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 172, in _build
      self._run_build_script(self._package.build_script)
    File "/tmp/tmpqzlbwpex/.venv/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 262, in _run_build_script
      subprocess.check_call([self.executable.as_posix(), build_script])
    File "/home/eliao/.pyenv/versions/3.12.1/lib/python3.12/subprocess.py", line 413, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/tmp/tmpqzlbwpex/.venv/bin/python', 'build.py']' returned non-zero exit status 1.
  

  at [~/.local/pipx/venvs/poetry/lib/python3.10/site-packages/poetry/installation/chef.py](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/eliao/projects/IMAO_DS/python_dev/ds_sandbox/sharepoint_automate/~/.local/pipx/venvs/poetry/lib/python3.10/site-packages/poetry/installation/chef.py):164 in _prepare
      160│ 
      161│                 error = ChefBuildError("\n\n".join(message_parts))
      162│ 
      163│             if error is not None:
    → 164│                 raise error from None
      165│ 
      166│             return path
      167│ 
      168│     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with pendulum (2.1.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pendulum (==2.1.2)"'.

Also failed trying using pip install:

pip install airbyte
Building wheels for collected packages: pendulum
  Building wheel for pendulum (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pendulum (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      Traceback (most recent call last):
        File "/tmp/pip-install-a1cc5gy7/pendulum_2d4989dfcedd41dc827c4c2e67120bd7/build.py", line 5, in <module>
          from distutils.command.build_ext import build_ext
      ModuleNotFoundError: No module named 'distutils'
      Traceback (most recent call last):
        File "/home/eliao/.cache/pypoetry/virtualenvs/sharepoint-automate-jCMQFMG6-py3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/eliao/.cache/pypoetry/virtualenvs/sharepoint-automate-jCMQFMG6-py3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/eliao/.cache/pypoetry/virtualenvs/sharepoint-automate-jCMQFMG6-py3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-g042xrh4/overlay/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 58, in build_wheel
          return WheelBuilder.make_in(
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-g042xrh4/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 88, in make_in
          wb.build(target_dir=directory)
        File "/tmp/pip-build-env-g042xrh4/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 123, in build
          self._build(zip_file)
        File "/tmp/pip-build-env-g042xrh4/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 172, in _build
          self._run_build_script(self._package.build_script)
        File "/tmp/pip-build-env-g042xrh4/overlay/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 262, in _run_build_script
          subprocess.check_call([self.executable.as_posix(), build_script])
        File "/home/eliao/.pyenv/versions/3.12.1/lib/python3.12/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/home/eliao/.cache/pypoetry/virtualenvs/sharepoint-automate-jCMQFMG6-py3.12/bin/python', 'build.py']' returned non-zero exit status 1.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pendulum
Failed to build pendulum
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pendulum)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions