首页 > 解决方案 > Python包不安装依赖项

问题描述

我遵循了关于发布 python 包的教程。我已将reader示例发布到 TestPyPI并尝试使用以下命令安装它。

pip install -i https://test.pypi.org/simple/ thrayld-reader-test

然而,这就是回应。

Looking in indexes: https://test.pypi.org/simple/
Collecting thrayld-reader-test
  Downloading https://test-files.pythonhosted.org/packages/88/ba/e9d9327dae4139e4c0754a13f22a04131c65aabc5fd22fb87e99a52309f6/thrayld_reader_test-1.0.0-py3-none-any.whl (5.2 kB)
Collecting feedparser
  Downloading https://test-files.pythonhosted.org/packages/ce/45/0f86efe62f6a0e1c3347e0c409dc680fc96e7951f6ecaf19aecd5a914b01/feedparser-6.0.3a1-py3-none-any.whl (82 kB)
     |████████████████████████████████| 82 kB 111 kB/s
ERROR: Could not find a version that satisfies the requirement html2text (from thrayld-reader-test)
ERROR: No matching distribution found for html2text

pip不下载依赖项,只抱怨他们不满意。

我的问题是为什么以及如何解决它?

我发现了一个类似的问题,但该解决方案不适用,因为我已经install_requiressetup.py示例中拥有了。

setup(
    ...
    install_requires=[
        "feedparser", "html2text", "importlib_resources", "typing"
    ],
    ...
)

标签: pythonpippypi

解决方案


推荐阅读