Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install failure on macOS (Cannot uninstall httpx 0.28.0) #23

Closed
jedahan opened this issue Dec 10, 2024 · 12 comments
Closed

Install failure on macOS (Cannot uninstall httpx 0.28.0) #23

jedahan opened this issue Dec 10, 2024 · 12 comments

Comments

@jedahan
Copy link

jedahan commented Dec 10, 2024

Not sure what followup steps to try, I am unfamiliar with python packaging

$ uname -a
Darwin hi.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Nov 14 18:15:21 PST 2024; root:xnu-11215.41.3~13/RELEASE_ARM64_T6041 arm64
$ which llm
/opt/homebrew/bin/llm
$ llm --version
llm, version 0.19.1
llm install llm-ollama

stdout

Collecting llm-ollama
  Using cached llm_ollama-0.7.1-py3-none-any.whl.metadata (5.2 kB)
Requirement already satisfied: llm in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm-ollama) (0.19.1)
Collecting ollama>=0.4 (from llm-ollama)
  Using cached ollama-0.4.4-py3-none-any.whl.metadata (4.7 kB)
Requirement already satisfied: pydantic>=2 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm-ollama) (2.10.3)
Collecting httpx<0.28.0,>=0.27.0 (from ollama>=0.4->llm-ollama)
  Using cached httpx-0.27.2-py3-none-any.whl.metadata (7.1 kB)
Requirement already satisfied: annotated-types>=0.6.0 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from pydantic>=2->llm-ollama) (0.7.0)
Requirement already satisfied: pydantic-core==2.27.1 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from pydantic>=2->llm-ollama) (2.27.1)
Requirement already satisfied: typing-extensions>=4.12.2 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from pydantic>=2->llm-ollama) (4.12.2)
Requirement already satisfied: click in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (8.1.7)
Requirement already satisfied: openai>=1.0 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (1.57.0)
Requirement already satisfied: click-default-group>=1.2.3 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (1.2.4)
Requirement already satisfied: sqlite-utils>=3.37 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (3.38)
Requirement already satisfied: sqlite-migrate>=0.1a2 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (0.1b0)
Requirement already satisfied: PyYAML in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (6.0.2)
Requirement already satisfied: pluggy in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (1.5.0)
Requirement already satisfied: python-ulid in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (3.0.0)
Requirement already satisfied: setuptools in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (75.6.0)
Requirement already satisfied: pip in /opt/homebrew/lib/python3.13/site-packages (from llm->llm-ollama) (24.3.1)
Requirement already satisfied: puremagic in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (1.28)
Requirement already satisfied: anyio in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (4.7.0)
Requirement already satisfied: certifi in /opt/homebrew/opt/certifi/lib/python3.13/site-packages (from httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (2024.8.30)
Requirement already satisfied: httpcore==1.* in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (1.0.7)
Requirement already satisfied: idna in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (3.10)
Requirement already satisfied: sniffio in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (1.3.1)
Requirement already satisfied: h11<0.15,>=0.13 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from httpcore==1.*->httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (0.14.0)
Requirement already satisfied: distro<2,>=1.7.0 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from openai>=1.0->llm->llm-ollama) (1.9.0)
Requirement already satisfied: jiter<1,>=0.4.0 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from openai>=1.0->llm->llm-ollama) (0.8.0)
Requirement already satisfied: tqdm>4 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from openai>=1.0->llm->llm-ollama) (4.67.1)
Requirement already satisfied: sqlite-fts4 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from sqlite-utils>=3.37->llm->llm-ollama) (1.0.3)
Requirement already satisfied: tabulate in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from sqlite-utils>=3.37->llm->llm-ollama) (0.9.0)
Requirement already satisfied: python-dateutil in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from sqlite-utils>=3.37->llm->llm-ollama) (2.9.0.post0)
Requirement already satisfied: six>=1.5 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from python-dateutil->sqlite-utils>=3.37->llm->llm-ollama) (1.17.0)
Using cached llm_ollama-0.7.1-py3-none-any.whl (10 kB)
Using cached ollama-0.4.4-py3-none-any.whl (13 kB)
Using cached httpx-0.27.2-py3-none-any.whl (76 kB)
Installing collected packages: httpx, ollama, llm-ollama
  Attempting uninstall: httpx
    Found existing installation: httpx 0.28.0

stderr

error: uninstall-no-record-file

× Cannot uninstall httpx 0.28.0
╰─> The package's contents are unknown: no RECORD file was found for httpx.
@taketwo
Copy link
Owner

taketwo commented Dec 10, 2024

Collecting httpx<0.28.0,>=0.27.0 (from ollama>=0.4->llm-ollama)
  Using cached httpx-0.27.2-py3-none-any.whl.metadata (7.1 kB)

This indicates that based on dependency version spec, it was decided that httpx-0.27.2 should be installed.

Found existing installation: httpx 0.28.0

However, a newer version that does not satisfy the version spec is already installed and thus has to be uninstalled first. That fails due to "no RECORD file" error. I have no idea about that, but quick googling yielded the following solution that you may consider: https://stackoverflow.com/a/71119218.

@taketwo taketwo closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2024
@edspencer
Copy link

I get the same problem, tried all the remedies I could think of via brew/pip/pip3, tried the stack overflow article, tried Chat GPT. No dice. Seems like one of those weird dependency issues that are obvious once you see it. Maybe pip vs pip3 vs mamba is confusing something? Some details:

$ pip3 --version
pip 24.3.1 from /Users/ed/miniforge3/lib/python3.10/site-packages/pip (python 3.10)

$ pip --version
pip 24.3.1 from /Users/ed/miniforge3/lib/python3.10/site-packages/pip (python 3.10)

$ which python
/Users/ed/miniforge3/bin/python

$ python --version
Python 3.10.12

Same error message about httpx 0.28.0

@jedahan
Copy link
Author

jedahan commented Dec 16, 2024

My error came from llm’s own bundled site-packages, which are not being handled by my system. It’s a conflict between llm choosing httpx 0.28 and llm-ollama wanting an earlier version. I no longer use llm / llm-ollama so it’s fine to close.

@taketwo
Copy link
Owner

taketwo commented Dec 16, 2024

On my system (Ubuntu 24.04), the httpx dependency is resolved to version 0.27.2 and is then installed successfully:

Collecting httpx<0.28.0,>=0.27.0 (from ollama>=0.4->llm-ollama==0.8.0)
  Using cached httpx-0.27.2-py3-none-any.whl.metadata (7.1 kB)

Note that llm-ollama does not depend on httpx directly. As @jedahan pointed out, the dependency comes from ollama. Therefore, I don't think we can do anything about this problem in the scope of this plugin.

@jedahan
Copy link
Author

jedahan commented Dec 16, 2024

would updating this plugin to use httpx 0.28 'solve' it?

@taketwo
Copy link
Owner

taketwo commented Dec 16, 2024

No, quite the opposite, this will make sure no-one can install this plugin anymore because it will become incompatible with ollama. Here is how the failure will look like:

...
The conflict is caused by:
    llm-ollama 0.8.0 depends on httpx>=0.28
    ollama 0.4.4 depends on httpx<0.28.0 and >=0.27.0
    llm-ollama 0.8.0 depends on httpx>=0.28
    ollama 0.4.3 depends on httpx<0.28.0 and >=0.27.0
    llm-ollama 0.8.0 depends on httpx>=0.28
    ollama 0.4.2 depends on httpx<0.28.0 and >=0.27.0
    llm-ollama 0.8.0 depends on httpx>=0.28
    ollama 0.4.1 depends on httpx<0.28.0 and >=0.27.0
    llm-ollama 0.8.0 depends on httpx>=0.28
    ollama 0.4.0 depends on httpx<0.28.0 and >=0.27.0

@taketwo
Copy link
Owner

taketwo commented Dec 16, 2024

I think the most future-oriented solution will be to poke ollama maintainers to lift the httpx<0.28.0 restriction. Chances are this is just a matter of updating dependency specs and won't require any code changes.

@jedahan
Copy link
Author

jedahan commented Dec 16, 2024

ollama/ollama-python#356 upstream request from a while ago

@taketwo taketwo changed the title Install failure on macOS Install failure on macOS (Cannot uninstall httpx 0.28.0) Jan 2, 2025
@taketwo taketwo reopened this Jan 2, 2025
@sannyii
Copy link

sannyii commented Jan 6, 2025

Not sure what followup steps to try, I am unfamiliar with python packaging↳

$ uname -a
Darwin hi.local 24.1.0 Darwin Kernel Version 24.1.0: Thu Nov 14 18:15:21 PST 2024; root:xnu-11215.41.3~13/RELEASE_ARM64_T6041 arm64
$ which llm
/opt/homebrew/bin/llm
$ llm --version
llm, version 0.19.1
llm install llm-ollama

stdout

Collecting llm-ollama
  Using cached llm_ollama-0.7.1-py3-none-any.whl.metadata (5.2 kB)
Requirement already satisfied: llm in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm-ollama) (0.19.1)
Collecting ollama>=0.4 (from llm-ollama)
  Using cached ollama-0.4.4-py3-none-any.whl.metadata (4.7 kB)
Requirement already satisfied: pydantic>=2 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm-ollama) (2.10.3)
Collecting httpx<0.28.0,>=0.27.0 (from ollama>=0.4->llm-ollama)
  Using cached httpx-0.27.2-py3-none-any.whl.metadata (7.1 kB)
Requirement already satisfied: annotated-types>=0.6.0 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from pydantic>=2->llm-ollama) (0.7.0)
Requirement already satisfied: pydantic-core==2.27.1 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from pydantic>=2->llm-ollama) (2.27.1)
Requirement already satisfied: typing-extensions>=4.12.2 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from pydantic>=2->llm-ollama) (4.12.2)
Requirement already satisfied: click in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (8.1.7)
Requirement already satisfied: openai>=1.0 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (1.57.0)
Requirement already satisfied: click-default-group>=1.2.3 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (1.2.4)
Requirement already satisfied: sqlite-utils>=3.37 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (3.38)
Requirement already satisfied: sqlite-migrate>=0.1a2 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (0.1b0)
Requirement already satisfied: PyYAML in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (6.0.2)
Requirement already satisfied: pluggy in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (1.5.0)
Requirement already satisfied: python-ulid in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (3.0.0)
Requirement already satisfied: setuptools in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (75.6.0)
Requirement already satisfied: pip in /opt/homebrew/lib/python3.13/site-packages (from llm->llm-ollama) (24.3.1)
Requirement already satisfied: puremagic in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from llm->llm-ollama) (1.28)
Requirement already satisfied: anyio in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (4.7.0)
Requirement already satisfied: certifi in /opt/homebrew/opt/certifi/lib/python3.13/site-packages (from httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (2024.8.30)
Requirement already satisfied: httpcore==1.* in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (1.0.7)
Requirement already satisfied: idna in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (3.10)
Requirement already satisfied: sniffio in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (1.3.1)
Requirement already satisfied: h11<0.15,>=0.13 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from httpcore==1.*->httpx<0.28.0,>=0.27.0->ollama>=0.4->llm-ollama) (0.14.0)
Requirement already satisfied: distro<2,>=1.7.0 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from openai>=1.0->llm->llm-ollama) (1.9.0)
Requirement already satisfied: jiter<1,>=0.4.0 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from openai>=1.0->llm->llm-ollama) (0.8.0)
Requirement already satisfied: tqdm>4 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from openai>=1.0->llm->llm-ollama) (4.67.1)
Requirement already satisfied: sqlite-fts4 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from sqlite-utils>=3.37->llm->llm-ollama) (1.0.3)
Requirement already satisfied: tabulate in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from sqlite-utils>=3.37->llm->llm-ollama) (0.9.0)
Requirement already satisfied: python-dateutil in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from sqlite-utils>=3.37->llm->llm-ollama) (2.9.0.post0)
Requirement already satisfied: six>=1.5 in /opt/homebrew/Cellar/llm/0.19.1/libexec/lib/python3.13/site-packages (from python-dateutil->sqlite-utils>=3.37->llm->llm-ollama) (1.17.0)
Using cached llm_ollama-0.7.1-py3-none-any.whl (10 kB)
Using cached ollama-0.4.4-py3-none-any.whl (13 kB)
Using cached httpx-0.27.2-py3-none-any.whl (76 kB)
Installing collected packages: httpx, ollama, llm-ollama
  Attempting uninstall: httpx
    Found existing installation: httpx 0.28.0

stderr

error: uninstall-no-record-file

× Cannot uninstall httpx 0.28.0
╰─> The package's contents are unknown: no RECORD file was found for httpx.

same problem; brew uninstall reinstall does not help

@taketwo
Copy link
Owner

taketwo commented Jan 6, 2025

Please follow the upstream issue ollama/ollama-python#356. We are stuck until Ollama lifts their required httpx version.

@taketwo
Copy link
Owner

taketwo commented Jan 23, 2025

The upstream issue was fixed, so the installation should work. Please re-open if any problems remain.

@taketwo taketwo closed this as completed Jan 23, 2025
@jedahan
Copy link
Author

jedahan commented Jan 23, 2025

works, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants