setup_env.py triggers unwanted pip install, causing environment conflicts
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 40.3k
- Forks
- 3.7k
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in setup_env.py, reading main() and setup_gguf(), then reproduce the behavior with a custom Python virtual environment by running python setup_env.py. Define the chosen handling for the gguf-py installation, and verify that the script no longer performs an unwanted unconditional install while preserving a clear path for users who need the dependency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devops, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100