KannarKK
KannarKK

Reputation: 1623

pipenv install throws "Requirement" object has no field "use_pep517"

pipenv lock works successfully. However, pipenv install or pipenv sync -d throws errors.

File "/Users/kkannar/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pipenv/routines/install.py", line 651, in _cleanup_procs
    dep.use_pep517 = True
    ^^^^^^^^^^^^^^
  File "/Users/kkannar/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pipenv/vendor/requirementslib/models/common.py", line 18, in __setattr__
    raise ValueError(f'"{self.__class__.__name__}" object has no field "{name}"')
ValueError: "Requirement" object has no field "use_pep517"

I have tried setting pyyaml to 6.0.1 or 5.3.1 but does not help.

System details: Apple M1

Rosetta mode (i386)

Upvotes: 5

Views: 644

Answers (1)

coderobot
coderobot

Reputation: 29

I had the same problem.

Running

pipenv sync -v

showed more detail on how the error arose sufficient to allow working out the root cause.

In my case my pyproject.toml file was incorrect - the licence field had become detached from the [project] object and was treated as part of the [project.scripts] object.

Upvotes: 0

Related Questions