admin管理员组文章数量:1400635
I'd like to get Open WebUI working with Ollama on Ubuntu 24.10, but installing it using pip and venv leads me to a torch
error.
Firstly, Ollama (0.6.2) is working: I can type /path/to/ollama list
and see the 3 models I've been working with.
Next, I follow the guidance in the error message after pip install open-webui
, relating to the use of the APT package manager, and so I use venv:
sudo apt-get install python3-full
python3 -m venv /path/to/venv
source /path/to/venv/bin/activate
python install open-webui
I then try python open-webui serve
, but this complains that there is no file or directory called open-webui
in my $HOME
directory. I see there is an executable file called open-webui
in my /path/to/venv/bin
so I try:
python /path/to/venv/bin/open-webui serve
...and I see the large OPEN WEBUI
text , and an error. Opening http://localhost:8080
in my browser seems to work, but how can I avoid the following error message?:
ERROR [open_webui.main] Error updating models: cannot import name 'Tensor' from 'torch' (unknown location)
I'd like to get Open WebUI working with Ollama on Ubuntu 24.10, but installing it using pip and venv leads me to a torch
error.
Firstly, Ollama (0.6.2) is working: I can type /path/to/ollama list
and see the 3 models I've been working with.
Next, I follow the guidance in the error message after pip install open-webui
, relating to the use of the APT package manager, and so I use venv:
sudo apt-get install python3-full
python3 -m venv /path/to/venv
source /path/to/venv/bin/activate
python install open-webui
I then try python open-webui serve
, but this complains that there is no file or directory called open-webui
in my $HOME
directory. I see there is an executable file called open-webui
in my /path/to/venv/bin
so I try:
python /path/to/venv/bin/open-webui serve
...and I see the large OPEN WEBUI
text , and an error. Opening http://localhost:8080
in my browser seems to work, but how can I avoid the following error message?:
ERROR [open_webui.main] Error updating models: cannot import name 'Tensor' from 'torch' (unknown location)
Share
Improve this question
asked Mar 23 at 21:15
user2023370user2023370
11.1k6 gold badges58 silver badges91 bronze badges
1 Answer
Reset to default 0Reinstalling torch using the following command (from here) worked for me:
(venv) $ pip install --upgrade --no-deps --force-reinstall torch
I issued the above command from within my venv, activated via source /path/to/venv/bin/activate
. The error message regarding torch then disappears.
本文标签: pythonHow to avoid a Torch error with Open WebUIOllamaStack Overflow
版权声明:本文标题:python - How to avoid a Torch error with Open WebUIOllama - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744269105a2598093.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论