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

相关推荐
AndrewHZ几秒前
【大模型技术博客】什么是大语言模型(LLM)?从零认识AI新范式
人工智能·深度学习·ai·语言模型·大模型·llm·transformer
godspeed_lucip9 分钟前
LLM和Agent——专题5: LLM Ops 入门(1)
人工智能·python
lqqjuly10 分钟前
状态空间模型:从经典控制论到现代序列建模——S4、Mamba 及其理论体系的完整论述(一)
人工智能
逻辑君10 分钟前
本地LLM的图像和视频理解
人工智能
AI医影跨模态组学11 分钟前
Nat. Biomed. Eng(1区top,IF=26.6)上海科技大学钱学军团队:一种用于乳腺癌风险分层的多模态机器学习模型
人工智能·科技·深度学习·机器学习·论文·医学影像
翼龙云_cloud15 分钟前
腾讯云代理商:腾讯云云桌面如何部署Hermes Agent?
人工智能·云计算·腾讯云·ai智能体·hermes agent
菜鸡旭旭16 分钟前
【AI培训中台-话术润色】
人工智能
云原生指北20 分钟前
从想法到发布:Harness Engineering 的一次完整实践
ai·agentic-coding·opensec
ftpeak21 分钟前
深入浅出 LoongSuite Python Agent:让你的 AI 应用「透明化」(下篇)
开发语言·人工智能·ai·ai编程·ai开发
蔡俊锋26 分钟前
为Agent重新设计云:Vibe Coding背后的新基建
人工智能·ai编程