mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
ollama-python does not install on Python 3.14 beta 1 #266
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 @craigahobbs on GitHub (May 8, 2025).
Repro:
macOS (building from source)
Debian Bookworm (using podman on macOS)
Expected: Success
Actual: Failure
The above failure isn't directly ollama-python's, its pydantic's, but kills install nonetheless.
@mxyng commented on GitHub (May 8, 2025):
As you've noted, the failure isn't in Ollama but in an upstream dependency. I suggest you create an issue there.
Python 3.14 is in early preview. The error you're seeing is due to pydantic trying and failing to build itself because there's no prebuilt package available. This is expected for new Python versions.
To build pydantic, you'll need to install the Rust toolchain
cargo, as the error suggests.@craigahobbs commented on GitHub (May 8, 2025):
I think it's important to point out that this will be a continual headache every year for projects that take a dependency on ollama-python as a result of its pydantic dependency, which is not great. Hope pydantic is giving you something good.
@craigahobbs commented on GitHub (May 9, 2025):
@mxyng it's worse than you let on:
So, once you install Rust it fails the install because PYO3 doesn't support Python 3.14. When will it? When will Pydantic bless us with native packages? We can only wonder...
I strongly disagree that a Python beta is an "early preview". Python betas are feature complete. This is the time for package maintainers to start testing so that bugs can be reported to ensure a stable Python release for their package. Currently, ollama-python, and everyone dependent on it, is untestable on Python 3.14.
Pydantic, because of its pointless Rust dependency, is a harmful dependency that is causing pain now and will indefinitely.