Fix Colab huggingface-hub conflict and pip bootstrap on uv venvs

- colab.py / setup.sh: relax == pins to >= when installing studio.txt
  on Colab so huggingface-hub 0.36.2 does not clobber Colab's bundled
  version (which breaks transformers is_offline_mode import)
- install_python_stack.py: when uv is unavailable and pip is missing
  (uv-created venvs), bootstrap via ensurepip before attempting upgrade
- Bump version to 2026.3.14
This commit is contained in:
Daniel Han 2026-03-25 16:15:29 +00:00
commit 0bb6379aad
2 changed files with 20 additions and 5 deletions

View file

@ -373,10 +373,25 @@ def install_python_stack() -> int:
],
)
else:
run(
"Upgrading pip",
[sys.executable, "-m", "pip", "install", "--upgrade", "pip"],
)
# pip may not exist yet (uv-created venvs omit it). Try ensurepip
# first, then upgrade. Only fall back to a direct upgrade when pip
# is already present.
_has_pip = subprocess.run(
[sys.executable, "-m", "pip", "--version"],
stdout = subprocess.DEVNULL,
stderr = subprocess.DEVNULL,
).returncode == 0
if not _has_pip:
run(
"Bootstrapping pip via ensurepip",
[sys.executable, "-m", "ensurepip", "--upgrade"],
)
else:
run(
"Upgrading pip",
[sys.executable, "-m", "pip", "install", "--upgrade", "pip"],
)
# 3. Core packages: unsloth-zoo + unsloth (or custom package name)
if skip_base:

View file

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = "2026.3.13"
__version__ = "2026.3.14"
__all__ = [
"SUPPORTS_BFLOAT16",