I got a warning from pip, how is this to be solved?
DEPRECATION: Legacy editable install of myproject[dev]==0.0.1 from file:///home/…myproject (setup.py develop) is deprecated. pip 25.0 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at Deprecate `pip install --editable` calling `setup.py develop` · Issue #11457 · pypa/pip · GitHub
The warning you’re seeing is due to the deprecation of the setup.py develop method for editable installs in pip. Starting with pip 25.0, this method will be phased out in favor of a more standardized approach using pyproject.toml and PEP 517. Here’s NYStateofHealth how you can resolve this:
Steps to Fix the Warning
Create a pyproject.toml: If you don’t already have one, create a pyproject.toml file in the root of your project. Here’s a basic example:
Modify Your setup.py: Ensure your setup.py is compatible with the new approach. If you have it structured properly, you might not need to change anything, but make sure it’s using setuptools correctly.
Install Using the New Editable Mode: Instead of using the legacy editable install command, you can run:
pip install --editable . --use-pep517 If You Encounter Issues: If you run into problems with the installation after making these changes, you can try the compatibility mode: