Closed tendrillion closed 1 year ago
pip install zhipuai
找到这个文件直接注释掉第一行即可
pip install zhipuai
已经安装了,但是仍然报这个错。
请确定python和streamlit命令所使用的python是否与您已安装zhipuai python包的环境一致。
请确定python和streamlit命令所使用的python是否与您已安装zhipuai python包的环境一致。
确实是环境的问题。
同求具体解决方法
查看Python SDK 支持的 python3版本,如:zhipuai 2.1.5.20230904 Python版本支持 正式的 Python (3.8, 3.9, 3.10, 3.11, 3.12)
问题描述 / Problem Description 参见 开发环境准备,完成环境搭建,确保已经安装了zhipuai。 新建py文件,import zhipuai,一切正常。 运行:python server/llm_api.py,也是执行了import zhipuai,一切正常。
但是运行:python startup.py -a 或者 streamlit run webui.py 报错:No module named 'zhipuai'
项目版本:v0.2.3
==============================Langchain-Chatchat Configuration============================== Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False. You can now view your Streamlit app in your browser. URL: http://0.0.0.0:8501
2023-09-07 16:15:39.891 Uncaught app exception Traceback (most recent call last): File "/home/user/.local/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script exec(code, module.dict) File "/home/user/kylin/Langchain-Chatchat/webui.py", line 8, in
from webui_pages.utils import
File "/home/user/kylin/Langchain-Chatchat/webui_pages/init.py", line 1, in
from .dialogue import dialogue_page, chat_box
File "/home/user/kylin/Langchain-Chatchat/webui_pages/dialogue/init.py", line 1, in
from .dialogue import dialogue_page, chat_box
File "/home/user/kylin/Langchain-Chatchat/webui_pages/dialogue/dialogue.py", line 3, in
from webui_pages.utils import
File "/home/user/kylin/Langchain-Chatchat/webui_pages/utils.py", line 19, in
from server.chat.openai_chat import OpenAiChatMsgIn
File "/home/user/kylin/Langchain-Chatchat/server/chat/init.py", line 2, in
from .knowledge_base_chat import knowledge_base_chat
File "/home/user/kylin/Langchain-Chatchat/server/chat/knowledge_base_chat.py", line 6, in
from server.utils import BaseResponse
File "/home/user/kylin/Langchain-Chatchat/server/utils.py", line 10, in
from server import model_workers
File "/home/user/kylin/Langchain-Chatchat/server/model_workers/init.py", line 1, in
from .zhipu import ChatGLMWorker
File "/home/user/kylin/Langchain-Chatchat/server/model_workers/zhipu.py", line 2, in
import zhipuai
ModuleNotFoundError: No module named 'zhipuai'