问题
Is there a way to tell python in the setup.py file that "python-dev" (which cannot be installed with pip because is a OS package) is necessary and therefore should be installed?
How to install it automatically?
回答1:
No. For one thing, the python-dev
package is specific to Debian-like distributions; there is no guarantee that other distributions will have a package with the same name that fulfills the desired role. For another, the user installing your Python package may have permission to install Python modules (e.g., in a virtualenv or user-specific directory) but not permission to install system packages.
来源:https://stackoverflow.com/questions/37702938/list-python-dev-as-install-requires-in-setup-py