gpt4 book ai didi

python - Nexus pypi 存储库 "Could not find a version that satisfies the requirement"

转载 作者:行者123 更新时间:2023-12-02 02:09:47 25 4
gpt4 key购买 nike

使用 nexus 3,我使用“https://pypi.org ”作为远程存储配置了一个代理 python 存储库。存储库的 url 是“http://localhost:8081/repository/pypi/”。

然后我使用pip使用nexus存储库安装软件包,在$HOME/.config/pip/pip.conf中我有以下配置:

[global]
index = http://localhost:8081/repository/pypi/pypi
index-url = http://localhost:8081/repository/pypi/stable
trusted-host = localhost

现在,当我运行 pip search pexpect 时,它工作正常:

User for localhost:8081: someuser
Password:
pexpect (4.7.0) - Pexpect allows easy control of interactive console applications.
pexpect-serial (0.0.4) - pexpect with pyseriat
...

但是当我运行 pip install pexpect 时,出现以下错误:

Collecting pexpect
User for localhost:8081: someuser
Password:
Could not find a version that satisfies the requirement pexpect (from versions: )
No matching distribution found for pexpect

我需要在 pip.conf 或我的 nexus 存储库中进行额外配置吗?

最佳答案

您应该更改此设置:

[global]
index = http://localhost:8081/repository/pypi/pypi
index-url = http://localhost:8081/repository/pypi/stable
trusted-host = localhost

对此(将stable 替换为simple):

[global]
index = http://localhost:8081/repository/pypi/pypi
index-url = http://localhost:8081/repository/pypi/simple
trusted-host = localhost

关于python - Nexus pypi 存储库 "Could not find a version that satisfies the requirement",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57073095/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com