【菜鸟飞】在vsCode中安装python的ollama包出错的问题

问题:

在vsCode中安装python的ollama包,执行命令

复制代码
pip install ollama

遇到错误:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.

ollama-python 0.1.2 requires requests<3.0.0,>=2.31.0, which is not installed.

ollama-python 0.1.2 requires httpx<0.27.0,>=0.26.0, but you have httpx 0.28.1 which is incompatible.

就是这样:

然后尝试命令pip install httpx==0.26.0后,又不符合ollama对httpx的版本要求,所以这个httpx不是和ollama-python版本冲突就是和ollama版本冲突,最终卸载重来,包括捣乱的ollama-python:

复制代码
pip uninstall ollama
pip uninstall ollama-python

然后再安装ollama,就通过了

相关推荐
why技术1 分钟前
AI Coding开始进入第四个时代,我还没上车呢!
前端·人工智能·后端
java1234_小锋3 分钟前
Spring AI 2.0 开发Java Agent智能体 - MCP(模型上下文协议)
java·人工智能·spring·spring ai
手写码匠5 分钟前
深入解析大模型架构之争:全能通用模型 vs 领域专精模型
人工智能·深度学习·算法·aigc
ZhengEnCi8 分钟前
09aa-偏置是什么?
人工智能
叶小鸡9 分钟前
Java 篇-项目实战-AI 天机学堂(从 0 到 1)-day1
java·开发语言
Daydream.V29 分钟前
Python Flask超全入门实战教程|从零基础到项目部署
大数据·python·flask
桦说编程1 小时前
我让 AI 加了一个开关,结果代码走了原本不该走的分支
人工智能·代码规范
fly spider1 小时前
AI 到底是怎么访问网页的?从爬虫、Browser Agent 到 Computer Use
人工智能·爬虫
databook1 小时前
Manim物理模拟:别自己写欧拉了!
python·数学·动效