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

相关推荐
IT_陈寒几秒前
SpringBoot自动配置坑了我,原来要这样绕过去
前端·人工智能·后端
东方小月11 分钟前
Claude Code 完整上手指南:MCP、Skills、第三方模型配置一次搞定
前端·人工智能·后端
tumu_C15 分钟前
用std::function减缓C++模板代码膨胀和编译压力的一个场景
开发语言·c++
AIFQuant22 分钟前
2026 全球股票/外汇/贵金属行情 API 深度对比:延迟、覆盖、价格与稳定性
python·websocket·ai·金融·mcp
BT-BOX28 分钟前
Matlab 2025B下载安装教程
开发语言·matlab
EnCi Zheng30 分钟前
01d-前馈神经网络代码实现 [特殊字符]
人工智能·深度学习·神经网络
阿里云大数据AI技术36 分钟前
登顶WorldArena榜单!阿里云PAI助力中科院自动化所、中科第五纪打造具身世界模型FlowWAM
人工智能
hixiong12337 分钟前
C# TensorRT部署RF-DETR目标检测&分割模型
人工智能·目标检测·计算机视觉·ai·c#
Ray Liang41 分钟前
吐血整理JSON-RPC2.0的原理与应用
python
小程故事多_801 小时前
[大模型面试系列] 深度解析ReAct框架,大模型Agent的“思考+行动”底层逻辑
人工智能·react.js·面试·职场和发展·智能体