Skip to content

ERROR: Failed to Installing pendulum (2.1.2) #9

@ITHwang

Description

@ITHwang

Hi, I'm applying alignai sdk (0.2.1) but I met an issue below when installing pendulum (2.1.2).

  • MacOS M3 Pro, sonoma 14.1
  • Poetry 1.8.3
  • Python 3.12

It seems to me that python 3.12 is not compatible with pendulum 2.1.2, but with ^3.0.0.
In python 3.11 both the alignai sdk and the pendulum are successfully installed.
python-pendulum/pendulum#454 (comment)

Error Message


$ poetry add alignai  
Using version ^0.2.1 for alignai

Updating dependencies
Resolving dependencies... (0.5s)

Package operations: 2 installs, 0 updates, 0 removals

  - Installing pendulum (2.1.2): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel
  
  Traceback (most recent call last):
    File "/private/var/folders/qq/p3vc32jn7hd4191jwd7hhsgm0000gn/T/tmpslig436n/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 "/Users/ithwang/.local/pipx/venvs/poetry/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
      main()
    File "/Users/ithwang/.local/pipx/venvs/poetry/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
      json_out["return_val"] = hook(**hook_input["kwargs"])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/ithwang/.local/pipx/venvs/poetry/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 271, in build_wheel
      return _build_backend().build_wheel(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/qq/p3vc32jn7hd4191jwd7hhsgm0000gn/T/tmpmat_d3y3/.venv/lib/python3.12/site-packages/poetry/core/masonry/api.py", line 58, in build_wheel
      return WheelBuilder.make_in(
             ^^^^^^^^^^^^^^^^^^^^^
    File "/private/var/folders/qq/p3vc32jn7hd4191jwd7hhsgm0000gn/T/tmpmat_d3y3/.venv/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 88, in make_in
      wb.build(target_dir=directory)
    File "/private/var/folders/qq/p3vc32jn7hd4191jwd7hhsgm0000gn/T/tmpmat_d3y3/.venv/lib/python3.12/site-packages/poetry/core/masonry/builders/wheel.py", line 123, in build
      self._build(zip_file)
    File "/private/var/folders/qq/p3vc32jn7hd4191jwd7hhsgm0000gn/T/tmpmat_d3y3/.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 "/private/var/folders/qq/p3vc32jn7hd4191jwd7hhsgm0000gn/T/tmpmat_d3y3/.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 "/opt/homebrew/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/subprocess.py", line 413, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/private/var/folders/qq/p3vc32jn7hd4191jwd7hhsgm0000gn/T/tmpmat_d3y3/.venv/bin/python', 'build.py']' returned non-zero exit status 1.
  

  at ~/.local/pipx/venvs/poetry/lib/python3.12/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)"'.

Environment Details


[tool.poetry.dependencies]
python = "^3.12"
fastapi = "^0.112.0"
uvicorn = "^0.30.5"
uvloop = "^0.19.0"
svcs = "^24.1.0"
pydantic = "^2.8.2"
llama-index = "^0.10.64"
sqlalchemy = "^2.0.32"
ruff = "^0.5.7"
munch = "^4.0.0"
pyyaml = "^6.0.2"
pydantic-settings = "^2.4.0"
aiosqlite = "^0.20.0"
greenlet = "^3.0.3"
anthropic = "^0.34.0"
streamlit = "^1.37.1"
motor = "^3.6.0"
pinecone = "^5.3.1"
litellm = "^1.48.16"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

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