python - 如何让 pip 列出它正在使用的存储库?
问题描述
我试图在我的机器上运行一个代码库,而 pip 没有找到一些依赖项。似乎在另一台机器上找到了它们,所以我想看看这两台机器上使用的是哪个 repos pip,以便进行比较。
我怎样才能做到这一点?
解决方案
更新为pip>=20
现在默认列出存储库,无需传递--verbose
参数:
$ pip download --no-cache-dir "foo<0" 2>&1 | grep Looking
Looking in indexes: https://pypi.org/simple, https://my-index.local, http://127.0.0.1:9000
原始答案
使用flag:或pip
时显示搜索包的存储库。指定一些不存在的要求,因此实际上不会下载/安装任何东西。例子:--verbose
pip install --verbose ...
pip download --verbose ...
pip
$ pip download --no-cache-dir --verbose "foo<0" 2>&1 | grep Looking
Looking in indexes: https://pypi.org/simple, https://my-index.local, http://127.0.0.1:9000
推荐阅读
- angularjs - 如何从 JEST 中的 a 指令访问函数?
- regex - 用总和代替可变数量的数字
- mysql - 如何在 Google App Script 中使用参数调用 MySQL 存储过程?
- python - DJANGO:Firefox 浏览器上不存在 request.COOKIES['sessionid']
- regex - 从范围中提取与“模式”匹配的所有行
- php - 使用 Insert_batch 但在 mysql 循环中为空
- javascript - addEventListener 的问题
- python-3.x - 匹配条件时合并具有相同长度的多个列表
- apache-kafka - 带有嵌入式 Kafka 的 Spring Kafka 测试在删除日志时失败
- javascript - getElementById(php 变量)不起作用