setup_env.py triggers unwanted pip install, causing environment conflicts
还没有人认领这个 Issue。
评估
调研方向
从 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
- Set up a Python virtual environment with desired/compatible package versions.
- Run
python setup_env.py. - 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
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/BitNet 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 86/100
-
i2_s SIGSEGVs at n_ubatch >= 32: BLAS backend dequantises by a row stride 4x the real packed row 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 86/100
-
难度 1/5 1 小时以内 新手友好度 92/100
-
难度 2/5 1-3 小时 新手友好度 76/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
good first issue
难度 2/5 1-3 小时 新手友好度 75/100
ros2/message_filters#338 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
subsurface/subsurface#4984 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
google-ai-edge/LiteRT-LM#3739 ·