【菜鸟飞】在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,就通过了

相关推荐
圆奋奋5 分钟前
DeepSeek Harness:尝鲜
ai·deepseek
企鹅的企33 分钟前
2027北京AI数字健康与智慧医疗展官方:超两成展品亚洲首秀
人工智能·科技·机器人
lvts_cs37 分钟前
淄博高新区绿天使数智创新港:高标准产研厂房全维度详解
大数据·人工智能
百胜软件@百胜软件1 小时前
从“人找货”到“货找人”:「胜券商品」如何用AI重构配补调
人工智能·重构
jufeng13071 小时前
【系列:手搓自主 AI Agent:Hermes 架构原理剖析 · 第 11 篇】
python·ai agent·mcp
风流 少年1 小时前
Spring AI 2.0:Advisor
android·人工智能·spring
mqiqe1 小时前
AgentScope Java Harness:4. 双层记忆系统 让 Agent 拥有真正的“长期大脑“
java·开发语言
gugucoding1 小时前
46. 【Java】JUC并发工具:让并发更简单
java·开发语言