pypa / pip

The Python package installer
https://pip.pypa.io/
MIT License
9.46k stars 3k forks source link

Deprecate call to `setup.py install` when `wheel` is absent for source distributions without pyproject.toml #8559

Closed sbidoul closed 1 year ago

sbidoul commented 4 years ago

This is one of a series of deprecations meant to collect feedback on the ultimate goal of always installing source distributions by first building a wheel and then installing from it.


If you're seeing this error, it's a symptom of either:

  1. A package failing to build. Scroll up in the output to see if "Building wheel" failed for the same package. If yes, then you want to investigate that issue and not this warning.
  2. Or, wheel not being installed in your environment.

    If you're a user, install that package in the environment to avoid hitting this issue.

    If you're the package author, make sure you can install the package with --use-pep517 passed into pip.


This specific issue is about the case when pip has to call setup.py bdist_wheel because the wheel package is not installed. In that case, pip currently displays deprecation warning and continues installation by attempting a setup.py install.

In a future version, pip will ~either (to be decided)~:

The recommended way to silence this warning is to enable the --use-pep517 flag, which will in turn install setuptools and wheel in an isolated environment where it will attempt to build a wheel and install it.

Towards #8102