When installing a pip package (eg. in a venv), if the wheel
package has not
previously been installed, the following line will appear in the console log:
Using legacy 'setup.py install' for <package name>, since package 'wheel' is not installed
where <package name>
identifies a pip package.
This line suggests that using setup.py is a fallback, and is not optimal. It could even suggest things could somehow go wrong. Legacy suggests something may be unsupported.
Is it better to install the wheel
package prior to installing other pip packages? I am not familiar with how wheels or setup.py work, any advice would be welcome.
(Note that prior to installing any pip package, I always upgrade pip to the latest version, to be on the safe side)
CodePudding user response:
You can read more about the differences here, but it comes down to two different ways how [pip] builds a source distribution:
- pyproject.toml based
Standards-backed interface, that has explicit declaration and management of build dependencies.- setup.py based
Legacy interface, that we’re working to migrate users away from. Has no good mechanisms to declare build dependencies.
The difference is thereby how dependencies can be specified by the package maintainer. The 1st option does thereby offer a more stable built experience as there is a better handling of dependencies. The current status is that pip
wants to migrate towards the usage of the wheel
package and it might be a good idea to have it installed. There is no strict need though if you feel like you don't want it and you can also install package A using setup.py
based approach and pyproject.toml
based approach for package B, there will be no issue for you as long as both packages built and install just fine