在setup.py中将python-dev列出为install_requires [英] list python-dev as install_requires in setup.py
问题描述
是否有一种方法可以告诉setup.py文件中的python是否必须安装"python-dev"(因为它是OS软件包,因此无法与pip一起安装)?
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?
如何自动安装?
推荐答案
否.一方面,python-dev
软件包专用于类似Debian的发行版.不能保证其他发行版将具有一个具有相同名称的程序包,以履行所需的作用.另外,安装Python软件包的用户可能具有安装Python模块的权限(例如,在virtualenv或用户特定的目录中),但没有安装系统软件包的权限.
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.
这篇关于在setup.py中将python-dev列出为install_requires的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!