Skip to content

Conversation

@kittawere
Copy link
Contributor

This is my first pull request, I know is not much but is honest work

GGUF AND LLAMA.cpp does not work inside a uv venv

Trying to test unslothai/unsloth#3215 I discovered that when inside a uv venv, the automatic installation of GGUF and llama.cpp overflows into the global system pip env

From what @rolandtannous said on unslothai/unsloth#3487 , python -m venv venv does not work, A conda env works as intended

My fix will allow unsloth to work on a uv venv without conda

Simple as f****

This morning I was doing a lot of stuff to check if the interpreter was inside a venv, if uv was installed etc....

Basically I was trying to check if you were in a venv, in that case check if the venv was created with uv checking pyvenv.cfg and in that case override final_pip on check_pip

But I figure out if on the PIP_OPTIONS I change the order, will try to use uv before the rest, and in the case that it is installed but you are not in a uv venv it should be compatible

Tests

Tested on uv venv and conda env on debian

@danielhanchen
Copy link
Contributor

Ok this is great thanks!

@danielhanchen danielhanchen merged commit 308a28d into unslothai:main Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants