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

bug: pip fails to install the package with current build system version #922

Closed
4 tasks done
Pouyanpi opened this issue Jan 8, 2025 · 0 comments · Fixed by #923
Closed
4 tasks done

bug: pip fails to install the package with current build system version #922

Pouyanpi opened this issue Jan 8, 2025 · 0 comments · Fixed by #923
Assignees
Labels
bug Something isn't working

Comments

@Pouyanpi
Copy link
Collaborator

Pouyanpi commented Jan 8, 2025

Did you check docs and existing issues?

  • I have read all the NeMo-Guardrails docs
  • I have updated the package to the latest version before submitting this issue
  • (optional) I have used the develop branch
  • I have searched the existing issues of NeMo-Guardrails

Python version (python --version)

Python 3.11

Operating system/version

MacOS 15.1.1 (24B91)

NeMo-Guardrails version (if you must use a specific version and not the latest

develop

Describe the bug

Installing the current develop branch with pip breaks as Poetry 2.0 has introduce breaking changes and backward incompatibility. This can happen to other projects that are setting NeMo Guardrails as dependency by referencing our github repo.

Steps To Reproduce

python -m venv env
source env/bin/activate
pip install -e . --no-cache-dir

Expected Behavior

Should install the package without any error.

Actual Behavior

following repro steps would raise following error:

Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing editable metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      Traceback (most recent call last):
        File "./NeMo-Guardrails/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "./NeMo-Guardrails/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "./NeMo-Guardrails/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 181, in prepare_metadata_for_build_editable
          return hook(metadata_directory, config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/12/mwcn15vx75l5_63v92hfws4r0000gp/T/pip-build-env-86jnsgho/overlay/lib/python3.11/site-packages/poetry/core/masonry/api.py", line 43, in prepare_metadata_for_build_wheel
          builder = WheelBuilder(poetry)
                    ^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/12/mwcn15vx75l5_63v92hfws4r0000gp/T/pip-build-env-86jnsgho/overlay/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 65, in __init__
          super().__init__(poetry, executable=executable)
        File "/private/var/folders/12/mwcn15vx75l5_63v92hfws4r0000gp/T/pip-build-env-86jnsgho/overlay/lib/python3.11/site-packages/poetry/core/masonry/builders/builder.py", line 43, in __init__
          self._meta = Metadata.from_package(self._package)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/12/mwcn15vx75l5_63v92hfws4r0000gp/T/pip-build-env-86jnsgho/overlay/lib/python3.11/site-packages/poetry/core/masonry/metadata.py", line 114, in from_package
          if name == "documentation" and url == package.urls["Documentation"]:
                                                ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
      KeyError: 'Documentation'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
@Pouyanpi Pouyanpi added the bug Something isn't working label Jan 8, 2025
@Pouyanpi Pouyanpi self-assigned this Jan 8, 2025
@Pouyanpi Pouyanpi changed the title bug: Pip fails to install the package with current build system version bug: pip fails to install the package with current build system version Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant