【发布时间】:2019-04-21 14:34:53
【问题描述】:
我的构建机器没有互联网连接。所以我在nexus中创建了名为“proxy_repo”的代理存储库,它指向https://pypi.org/。并在构建机器中创建了 ~/.pip/pip.config。
https://pypi.org/被允许通过nexus从构建机器访问。
pip.conf 内容如下
[global]
trusted-host=MyPrivate-nexusrepo.com
index = https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/pypi
index-url = https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple
当我执行任何 pip 命令时,说“pip -v install django”,我总是遇到错误。有人可以帮忙吗?
Collecting django
1 location(s) to search for versions of django:
* https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple/django/
Getting page https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple/django/
Looking up "https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple/django/" in the cache
No cache entry available
Starting new HTTPS connection (1): MyPrivate-nexusrepo.com
"GET /content/repositories/proxy_repo/simple/django/ HTTP/1.1" 404 None
Could not fetch URL https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple/django/: 404 Client Error: Not Found for url: https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple/django/ - skipping
Could not find a version that satisfies the requirement django (from versions: )
Cleaning up...
No matching distribution found for django
【问题讨论】: