nmt-seq2seq-translator / docs /errors /setuptools_backends_legacy.md
Mohammed Benguerine
Add file setuptools_backends_legacy
9a5a1e1
|
Raw
History Blame Contribute Delete
1.12 kB

A newer version of the Gradio SDK is available: 6.20.0

Upgrade

BackendUnavailable β€” setuptools.backends.legacy

Date: 2026-04-12
Project: Neural Machine Translation
Environment: Windows 11, Python 3.12.9


Error message

pip._vendor.pyproject_hooks._impl.BackendUnavailable:
Cannot import 'setuptools.backends.legacy'

Context

Running pip install -e . after creating pyproject.toml with build-backend = "setuptools.backends.legacy:build".

Why it happened

The setuptools.backends.legacy module only exists in newer versions of setuptools. The installed version was too old to support it.

What fixed it

Step 1 β€” Updated pyproject.toml to use the stable backend:

[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"

Step 2 β€” Upgraded setuptools and reinstalled:

pip install --upgrade setuptools
pip install -e .

Lesson learned

Always use setuptools.build_meta as the build backend β€” it's the stable, well-supported option that works across all setuptools versions >= 64. Never use setuptools.backends.legacy β€” it's version-specific and unreliable.