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

相关推荐
小王努力学编程1 分钟前
LangChain——AI应用开发框架(核心组件1)
linux·服务器·前端·数据库·c++·人工智能·langchain
写代码的【黑咖啡】2 分钟前
Python中的lxml:高效XML处理库
xml·开发语言·python
庄小焱6 分钟前
【机器学习】——房屋销售价格预测实战
人工智能·算法·机器学习·预测模型
黎雁·泠崖6 分钟前
Java字符串高阶:底层原理深剖+经典面试题全解
java·开发语言
清风~徐~来13 分钟前
【视频点播系统】环境搭建
开发语言
人工智能AI技术13 分钟前
【Agent从入门到实践】29 开发第一个Agent——需求定义
人工智能·python
重生之我是Java开发战士14 分钟前
【Java SE】反射、枚举与Lambda表达式
java·开发语言
weixin_4365250716 分钟前
若依多租户版 - @ApiEncrypt, api接口加密
java·开发语言
爱喝可乐的老王17 分钟前
深度学习初认识
人工智能·深度学习
superman超哥18 分钟前
序列化格式的灵活切换:Serde 生态的统一抽象力量
开发语言·rust·编程语言·rust serde·序列化格式·rust序列化格式