question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Disable PEP 517 error with editable install

See original GitHub issue

Issue description

pipenv install with an editable source leads to error “Disabling PEP 517 processing is invalid: project specifies a build backend of setuptools.build_meta:legacy in pyproject.toml”. However, the project doesn’t use any `pyproject.toml, so I have no idea where this is coming from.

The relevant part of the pipfile is

[packages.e1839a8]
path = "."
editable = true

https://github.com/tobiasdiez/sage/blob/fe43eb81da698ab06536c6adf0694b4c508fd65f/src/Pipfile#L29-L31

Expected result

Successful installation.

Actual result

Installing 'e1839a8'
$ ['/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/bin/pip', 'install', '--verbose', '--upgrade', '--no-use-pep517', '--exists-action=i', '-r', '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pipenv-15afg11l-requirements/pipenv-rhh7sbpy-requirement.txt', '-i', 'https://pypi.org/simple']
Using source directory: '/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/src'
Using pip 20.2.1 from /Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip (python 3.8)
Non-user install by explicit request
Created temporary directory: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-ephem-wheel-cache-6w3f6p4l
Created temporary directory: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-req-tracker-wg3nc7wc
Initialized build tracking at /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-req-tracker-wg3nc7wc
Created build tracker: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-req-tracker-wg3nc7wc
Entered build tracker: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-req-tracker-wg3nc7wc
Created temporary directory: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-e82f8g60
Obtaining file:///Users/runner/work/sage/sage/src (from -r /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pipenv-15afg11l-requirements/pipenv-rhh7sbpy-requirement.txt (line 1))
  Added file:///Users/runner/work/sage/sage/src (from -r /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pipenv-15afg11l-requirements/pipenv-rhh7sbpy-requirement.txt (line 1)) to build tracker '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-req-tracker-wg3nc7wc'
Exception information:
Traceback (most recent call last):
  File "/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
    status = self.run(options, args)
  File "/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 324, in run
    requirement_set = resolver.resolve(
  File "/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 326, in _get_abstract_dist_for
    return self.preparer.prepare_editable_requirement(req)
  File "/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 525, in prepare_editable_requirement
    abstract_dist = _get_prepared_distribution(
  File "/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 91, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip/_internal/distributions/sdist.py", line 33, in prepare_distribution_metadata
    self.req.load_pyproject_toml()
  File "/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 503, in load_pyproject_toml
    pyproject_toml_data = load_pyproject_toml(
  File "/Users/runner/.local/share/virtualenvs/src-wmLs4vOe/lib/python3.8/site-packages/pip/_internal/pyproject.py", line 95, in load_pyproject_toml
    raise InstallationError(
pip._internal.exceptions.InstallationError: Disabling PEP 517 processing is invalid: project specifies a build backend of setuptools.build_meta:__legacy__ in pyproject.toml

See https://github.com/tobiasdiez/sage/runs/1204858164?check_suite_focus=true for the full output. (Note that github still marks the step as successful, so the return value is not correctly reflecting that there was an error.)

Steps to replicate

Run pipenv install with the following pipfile: https://github.com/tobiasdiez/sage/blob/fe43eb81da698ab06536c6adf0694b4c508fd65f/src/Pipfile

The following github action workflow shows this issue: https://github.com/tobiasdiez/sage/blob/public/build/inplace/.github/workflows/ci-pipenv.yml

Note that the same pipfile works on pipenv 11.9.0 (on Ubuntu).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
tobiasdiezcommented, Oct 18, 2020

May I ask to please reopen this issue as the behavior of hiding the error message and using different cmd arguments for the second compilation is at least very confusing. Moreover, if I remember correctly no-use-pep517 will always fail for inplace installs.

5reactions
tobiasdiezcommented, Feb 10, 2021

My current workaround is to run pipenv run pip install PACKAGE --verbose --upgrade --exists-action=i --no-build-isolation whenever there is an error with some PACKAGE. This yields a quite helpful error message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pipenv install fails on cryptography package: "Disabling PEP ...
Pipenv install fails on cryptography package: "Disabling PEP 517 processing is invalid" error ; "https://pypi.python.org/simple" verify_ssl = ...
Read more >
PEP 660: Editable installs for PEP-517 style build backends
To me the PEP read that it was only specifying the interface between build front-ends and back-ends when installing packages as editable, like...
Read more >
Changelog - pip documentation v22.3.1
Fix an error when trying to uninstall packages installed as editable from a ... Correctly allow PEP 517 projects to be detected without...
Read more >
Disabling PEP 517 processing is invalid' on Raspberry Pi ...
'ERROR: Disabling PEP 517 processing is invalid' on Raspberry Pi. I have tried to build the Docker image on Raspbian.
Read more >
Changelog - PDM
#1010; Fallback to pdm.pep517 as the metadata transformer for unknown custom ... #1396; Fix a crash issue when depending on editable packages with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found