prometheus / prometheus/client_python

installed package name doesnt match

未关闭
#1,010 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Python
星标
4.4k
派生
876
平均合并
8 天 4 小时
30 天内合并 PR
1

描述

There appears to be some discrepancy between the pip package name and the name of the installed package
Both prometheus_client and prometheus-client appear to be valid names to install the package

python3 -m pip index versions prometheus-client
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
prometheus-client (0.20.0)
python3 -m pip index versions prometheus_client
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
prometheus_client (0.20.0)

but the actual installed package is named prometheus_client

prometheus_client      0.20.0

and the files on disk reflect that name

ll /usr/local/lib/python3.8/dist-packages
total 32
 4096 Feb 27 10:26 ./
 4096 Jun 27  2022 ../
 4096 Feb 27 10:26 pip/
 4096 Feb 27 10:26 pip-24.0.dist-info/
 4096 Feb 27 10:26 prometheus_client/
 4096 Feb 27 10:26 prometheus_client-0.20.0.dist-info/

All the documentation suggest using

pip install prometheus-client

but that name doesn't match what is output from pip list
which in my case causes problem for automation scripts as the name in the list of installed packages does not match the name of the package to be installed

which name is the correct one?
why does the package name not match the installed package name on disk or in pip list

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先比较 pip 使用的 distribution 名称与报告中显示的 import/package 目录。明确哪个名称用于安装才是正确的,并在文档中解释两者的区别,然后通过可复现的 pip index 和 pip list 检查来验证对自动化的影响。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
build-system, documentation
Issue 类型
文档
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。