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

相关推荐
闲云一鹤6 小时前
Python 入门(四)- Openpyxl 操作 Excel 教程
python·excel
俞凡6 小时前
MCP 服务器开发实战:15 分钟从零到生产级部署
人工智能
2401_865439636 小时前
C#怎么将控制台输出保存到TXT_C#如何重定向输出流【源码】
jvm·数据库·python
码云数智-园园6 小时前
Python的GIL锁如何影响多线程性能?有哪些替代方案?
开发语言
小超同学你好6 小时前
OpenClaw 深度解析与源代码导读 · 第3篇:Gateway——常驻控制面、单端口多协议与进程骨架
人工智能·深度学习·语言模型·gateway
咬_咬6 小时前
go语言学习(map)
开发语言·学习·golang·map
古城小栈6 小时前
rustup 命令工具,掌控 Rust 开发环境
开发语言·后端·rust
克里斯蒂亚诺·罗纳尔达6 小时前
智能体学习21——知识检索(RAG)
人工智能·学习·ai
2301_815279526 小时前
Golang和Node.js哪个适合后端_Golang Node对比教程【实战】
jvm·数据库·python
m0_748839496 小时前
CSS如何制作圆形头像盒子_设置border-radius-50%
jvm·数据库·python