【发布时间】: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/…
-
您需要在包中使用与我假设的文件相同的名称。 (破折号与下划线)