collect_info.py does not start: pkg_resources is gone from setuptools 82

オープン 初心者向け
#2,354 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@hemv-857 がすでに取り組んでいます。

2026年10月24日 から。

  • #2355 @LudwigJMarx による — オープン
  • #2386 @hemv-857 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
85/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
cli, tooling

調査の方向性

scripts/collect_info.py から始め、特にモジュールレベルの import と REQUIRED パッケージリストを確認します。setuptools が提供する pkg_resources がなく、wheel と cython もない環境で cd scripts 66 python collect_info.py all を実行します。スクリプトがシステム、Python、パッケージの詳細を出力し、0 で終了すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

🐛 Bug Description

scripts/collect_info.py aborts on its first import. This is the script the
bug report template points users to for their environment details.

Two causes, one behind the other, both in the same file:

cause effect
1 import pkg_resources at module level ModuleNotFoundError, the script never starts
2 REQUIRED lists wheel and cython DistributionNotFound, the script dies part way through its output

The second one only becomes visible once the first is fixed. wheel and
cython sit in build-system.requires, not in dependencies, so a plain
pip install pyqlib does not have them.

To Reproduce

  1. Install qlib in an environment with setuptools 82 or newer. Since Python
    3.12 python -m venv no longer seeds setuptools at all, so pkg_resources
    can be missing regardless of any version boundary.
  2. cd scripts && python collect_info.py all
  3. Output:
Traceback (most recent call last):
  File "scripts/collect_info.py", line 5, in <module>
    import pkg_resources
ModuleNotFoundError: No module named 'pkg_resources'

Measured boundary, one throwaway venv per version, nothing else changed:

setuptools ships pkg_resources
80.9.0 yes
81.0.0 yes, with a deprecation warning
82.0.0 no

Expected Behavior

collect_info.py all prints the system, Python and package details and exits
with 0, including when a package from its list is not installed.

Environment

Collected by hand, since the script itself does not run:

  • Qlib version: 0.9.8.dev34 (editable install)
  • Python version: 3.12.13
  • OS: MacOS 26.6.2, arm64
  • Commit number: be725493eb1a6bbb42bf11b37aa7669f59610ff1
  • setuptools 84.0.0

Additional Notes

#1947 covers the same line, but from June 2025, when it was still a
UserWarning with a different traceback behind it. Today the script does not
start at all.

主要言語
Python
スター
49.9k
フォーク
7.9k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoft/qlib のほかの issue

microsoft/qlib の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。