Skip to content

Changes to the "pyproject.toml" file when executing the command "poetry install" #7350

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

Open
gywgyw216216 opened this issue Apr 8, 2025 · 0 comments

Comments

@gywgyw216216
Copy link

When installing locally through the source code, execute the command poetry install, the actual operation times error, prompt:

The Poetry configuration is invalid:
- 'name' is a required property
- 'version' is a required property
- 'description' is a required property
- 'authors' is a required property

The reason is that "pyproject.toml" uses a mixture of [project] and [tool.poetry] configurations, and if there is a conflict between the two, you should just cut the contents of the former into the latter.

When you run the command again, there is still an error, as follows:

The Poetry configuration is invalid:
- [authors.0] {'name': 'HumanSignal', 'email': 'support@humansignal.com'} is not of type 'string'
- Additional properties are not allowed ('requires-python' was unexpected)

In this case:

  1. Change authors = ["HumanSignal <support@humansignal.com>"] because Poetry requires authors to be lists of strings;
  2. Remove the "requirements-python" line from [tool.poetry] because it is configured correctly under [tool.poetry.dependencies]. This is because Python version constraints should be defined in the python field under [tool.poetry.dependencies], not directly in [tool.poetry].

When you modify "pyproject.toml" correctly, you can execute a series of official guidance commands smoothly.
Therefore, I raise this issue and hope it will be helpful. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant