> 技术文档 > 解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui

解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui


报错截图

解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui

C:\\Users\\121>pip install open-webuiLooking in indexes: https://mirrors.aliyun.com/pypi/simple ERROR: Could not find a version that satisfies the requirement openwebui (from versions: none) ERROR: No matching distribution found for openwebui

解决方法

确保你是python3.11的前提下,先创建python虚拟环境,再使用pip安装open-webui

# 查看python版本python -V# 创建虚拟环境python -m venv openwebui# 启动虚拟环境openwebui\\Scripts\\activate# 安装open-webuipip install open-webui

看到这段就说明安装成功了(解决方法到这就结束了,有兴趣可以看看题主下面的解决思路)
解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui

解决思路

授人鱼不如授人以渔,希望我排除问题的思路可以为你以后遇到问题提供多一种解决方法

1.检查python版本是否与官方要求版本3.11一致

解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui

python -V

2.查看官方是否有该安装包

​官方网站:https://pypi.org/project/open-webui/#description
解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui
在官方源中找到该安装包,因此考虑是不是第三方源没有及时更新(概率极小,因为这个包已经出来很久了),但抱着尝试的心态用官方源试试,结果还是报错找不到
解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui

pip install openwebui -i https://pypi.org/simple

3. 使用whl本地安装

whl是一种预编译的二进制包,已经将源代码编译成了可以直接安装和使用的形式

既然pip在网上下载不行,那就试试本地安装。点击下图中download,选择第三个whl安装,下载到本地目录,记住目录名,后面安装的时候有用
解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui
解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui
把下面C:\\Users\\121\\Downloads\\open_webui-0.6.2-py3-none-any.whl换成你的whl文件位置

pip install C:\\Users\\121\\Downloads\\open_webui-0.6.2-py3-none-any.whl

解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui
结果还是报错,大概率是和我以前安装的包冲突了,这里说明了一个问题,就是最好使用虚拟环境去进行项目的搭建,因为题主之前一直都是写一些demo或者小项目,所有就直接在通用的环境下安装各种包了,也没遇到过什么冲突问题,这次就遇到坑了。因此使用虚拟环境安装第三方库是一个很重要的事情!!!

4. 最终的解决方案—创建虚拟环境安装

使用venv创建虚拟环境,然后在虚拟环境中使用pip命令安装
注意事项:

  • 当前目录下不要有与你所创建的虚拟环境名称同名的文件夹
  • 下次启动的时候要先启动虚拟环境,启动命令为:虚拟环境名称\\Scripts\\activate

解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui

python -m venv openwebuiopenwebui\\Scripts\\activate

按下回车后路径前面出现了你的虚拟环境名字就代表成功了
解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui
解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui

pip install open-webui

这部安装的内容非常多,需要耐心等待一段时间,看到下面红框这一段就说明启动成功了
解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui
最后使用open-webui serve命令,然后在浏览器localhost:8080就可以看到了
解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui
解决pip无法安装open-webui报错:ERROR: No matching distribution found for openwebui_pip install open-webui