Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

setup_env.py triggers unwanted pip install, causing environment conflicts

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

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
devops, tooling

调研方向

从 setup_env.py 开始,阅读 main() 和 setup_gguf(),然后通过运行 python setup_env.py,在自定义 Python 虚拟环境中复现该行为。定义对 gguf-py 安装所采用的处理方式,并验证脚本不再执行不需要的无条件安装,同时为需要该依赖项的用户保留清晰的途径。

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

描述

Bug Summary

The setup_env.py script breaks custom or virtual Python environments due to a forced pip installation. In the main() function, the very first step is to call setup_gguf(), which, in turn, runs:

sys.executable -m pip install 3rdparty/llama.cpp/gguf-py

This unconditional install step clashes with existing venv configurations, often causing dependency/version conflicts and making integration with user-managed Python environments difficult or unstable.

Steps to Reproduce

  1. Set up a Python virtual environment with desired/compatible package versions.
  2. Run python setup_env.py.
  3. Observe that the script performs its own install step, overriding or conflicting with the current environment state.

Expected Behavior

The script should respect the user's Python environment and avoid running recursive or unconditional pip installs. It should either:

  • Detect when dependencies are missing and prompt the user,
  • Allow the user to opt-in or skip the pip install, or
  • Provide clear documentation/instructions for manual installation.

Actual Behavior

  • The script forces an install of its dependencies, potentially breaking user setups and overwriting targeted package versions.

Additional Context

This behavior makes it hard to use the script in controlled environments (e.g., CI pipelines, docker, or custom venvs) and introduces risk for version incompatibility bugs.


Suggested Fix:

  • Make the install step optional, detectable by a command-line flag (e.g., --install-gguf)
  • Or, remove the call from main() and only document the install as a manual, one-time user step.
主要语言
C++
星标
40.3k
派生
3.7k
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

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

microsoft/BitNet 的其他 Issue

查看 microsoft/BitNet 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

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