【问题标题】:PyPiServer debugging "could not find a version that satisfies the requirement"PyPiServer调试“找不到满足要求的版本”
【发布时间】:2020-08-17 09:15:41
【问题描述】:

我正在使用 PyPiServer 创建一个私有包存储库。我在一个 VPS 实例上提供此服务,并尝试从另一个 VPS 实例安装。

来自 pip 的回溯:

root@managersvr:~# pip install --index-url http://<IP>:8080/simple/ global_toolkit --trusted-host <IP>
  Could not find a version that satisfies the requirement global_toolkit (from versions: )
No matching distribution found for global_toolkit
root@managersvr:~# 

来自 PyPi 的服务器日志:

[02/May/2020 23:57:10] "GET /simple/global-toolkit/ HTTP/1.1" 200 313

我正在努力调试。到目前为止采取的步骤: - 我已经跑了pip install --upgrade pip - 我已经导航到浏览器中的 PyPi IP 地址,它正确显示:

Welcome to pypiserver!
This is a PyPI compatible package index serving 1 packages.

To use this server with pip, run the following command:

        pip install --index-url http://<IP>:8080/simple/ PACKAGE [PACKAGE2...]

To use this server with easy_install, run the following command:

        easy_install --index-url http://<IP>:8080/simple/ PACKAGE [PACKAGE2...]

The complete list of all packages can be found here or via the simple index.

This instance is running version 1.3.2 of the pypiserver software.

导航到“此处”链接以获取所有软件包的完整列表:

Index of packages
global_toolkit.tar.gz

然后导航到简单的索引产生:

Simple Index
global-toolkit

我也尝试使用 global-toolkit 而不是 global_toolkit。

我正在寻找步骤来识别出现错误的层并对其进行调试。谢谢。

更新

我找到了 pip search 命令。输出很奇怪:

(venv) root@managersvr:~# pip search --index http://<IP>:8080 global_toolkit
global_toolkit ()  - 

【问题讨论】:

  • 包是否必须是特定格式(例如 .eggs)?
  • 可能的。我正在关注本教程,尽管它指定了 .tar.tz linode.com/docs/applications/project-management/…
  • 您需要在包中使用与我假设的文件相同的名称。 (破折号与下划线)

标签: python pip package pypi


【解决方案1】:

我已经解决了这个问题。事后看来,我应该预见到这个问题。我未能在顶层 setup.py 中包含我的 ext_modules 值(因此未编译 cython 模块)。调试的好技巧:使用 -v 标志!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-03-20
    • 2021-12-25
    • 2018-10-13
    • 2019-07-18
    • 2020-04-15
    • 2015-11-24
    • 2013-08-16
    • 2018-07-21
    相关资源
    最近更新 更多