我正在使用PyPiServer创建一个私有包库。我在一个VPS实例上服务于此,并试图从另一个实例上进行pip安装。
从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搜索命令。输出是,奇怪。
(venv) root@managersvr:~# pip search --index http://<IP>:8080 global_toolkit
global_toolkit () -
我已经解决了这个问题。事后看来,我应该预见到这个问题。我没有在顶层的setup.py中包含ext_modules的值(所以cython模块没有被编译)。一个调试的好建议是:使用-v标志!