如何使用setuptools将lxml包含在python包的依赖列表中?

如何使用setuptools将lxml包含在python包的依赖列表中?,python,lxml,packaging,setuptools,Python,Lxml,Packaging,Setuptools,我在setup.py文件中使用了以下代码 setup(..., install_requires=[ 'lxml' ], .....) 但是当我安装这个软件包时,它会出现以下错误 Scanning index of all packages (this may take a while) Reading http://pypi.python.org/simple/ No local packages or downloa

我在setup.py文件中使用了以下代码

setup(...,
    install_requires=[       
          'lxml'
      ],
      .....)
但是当我安装这个软件包时,它会出现以下错误

    Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
No local packages or download links found for lxml
error: Could not find suitable distribution for Requirement.parse('lxml')
如何设置以安装lxml库


谢谢你的帮助:)

奇怪;我看到
lxml
就在
http://pypi.python.org/simple/lxml/
;您是否使用了代理或阻止
setuptools
查找依赖项的东西?假设pypi中没有某个库(第三方)如何将其添加到所需的安装中。将其留给
easyinstall
pip
zc.buildout
来查找依赖项。仅在
install\u requires
.ya中列出软件包名称。但是我遇到了这样一个错误:读取时找不到'yaml'的索引页(可能拼写错误?)。扫描所有软件包的索引(这可能需要一段时间)读取时没有找到本地软件包或yaml的下载链接错误:找不到适合需求的分发版。parse('yaml'))也许你想安装?PyPI上确实没有名为
yaml
的包,但是
PyYaml
包安装
yaml
库。