mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Critical Packaging Error: Wheels for ollama 0.1.8 and 0.2.1 on PyPI contain pre-0.1.8 code #272
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kelii7 on GitHub (May 25, 2025).
1/The .whl files for ollama==0.1.8 and ollama==0.2.1 on PyPI are incorrect.
When downloaded and inspected (or installed), ollama/__init__.py is missing the version = metadata.version(name) definition.
ollama/client.py's AsyncClient class is missing the aclose method.
The content of these files matches older versions (e.g., v0.1.7 or earlier).
2/ version 0.4.8 is also affected by this packaging error. the wheel for 0.4.8 on PyPI is also missing version in ollama/__init_.py and AsyncClient.aclose in ollama/_client.py, despite these being present in the v0.4.8 tag on GitHub.
This causes AttributeError for ollama.version and AsyncClient.aclose().
i confirmed this by manually downloading the wheels, unzipping them, and inspecting the source files directly.
@ParthSareen commented on GitHub (Jun 13, 2025):
That's weird. Is there a reason you are using those versions?
@mxyng commented on GitHub (Jun 13, 2025):
The contents of 0.1.8, 0.2.1, and 0.4.8 match their respective tags.
The premise
ollama.__version__andAsyncClient.aclose()is accessible is incorrect.__version__has never been exported by the ollama package. It's only used internally to set the HTTP User Agent.AsyncClienthas never implementedaclose()or__aclose__()since it's not intended to be an asynchronous context manager. There's no mention ofacloseanywhere in git history so it's unclear what you mean by "despite these being present in the v0.4.8"