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

相关推荐
mlidongfeng1 分钟前
[AI][昇腾950] Scalar 性能优化
人工智能·性能优化
cui_ruicheng1 分钟前
Python数据分析(十一):数据可视化与 Matplotlib
python·信息可视化·数据分析·matplotlib
鱼饼Y5 分钟前
AI时代,使用大模型学习LangChain (3)——LCEL
人工智能·langchain
冬哥聊AI6 分钟前
三面追问:百万行代码库怎么跑好Claude Code?harness五层才是关键
人工智能
superrick7 分钟前
MCP 协议深度解析:AI Agent 的工具集成标准
python
小灰灰搞电子14 分钟前
Qt 队列容器 QQueue 的详解与示例
开发语言·qt·qqueue
云杨15 分钟前
SnakeEats 技术解剖:扫描器是蛇,文档是它会生长的身体——人机协作的新数据层
人工智能·开源
小鬼头编程25 分钟前
信息学竞赛体系(CSP-J/S、NOIP、NOI、IOI)
c++·人工智能·青少年编程
MRfyyt26 分钟前
一个 for 循环搞定 AI Agent:Function Calling + ReAct 实战
人工智能