From a21791db540d689fe3d914cdd489d03acff33a66 Mon Sep 17 00:00:00 2001 From: glide-the <2533736852@qq.com> Date: Sun, 31 Mar 2024 19:48:04 +0800 Subject: [PATCH] exec path fix --- chatchat-server/chatchat/startup.py | 7 +++++-- chatchat-server/pyproject.toml | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/chatchat-server/chatchat/startup.py b/chatchat-server/chatchat/startup.py index 1337519b..caea2df3 100644 --- a/chatchat-server/chatchat/startup.py +++ b/chatchat-server/chatchat/startup.py @@ -64,8 +64,11 @@ def run_webui(started_event: mp.Event = None, run_mode: str = None): host = WEBUI_SERVER["host"] port = WEBUI_SERVER["port"] - - st_exe = os.path.join(os.path.dirname(sys.executable),"scripts","streamlit") + # 判断系统是否为Windows + if sys.platform == "win32": + st_exe = os.path.join(os.path.dirname(sys.executable), "Scripts", "streamlit") + else: + st_exe = os.path.join(os.path.dirname(sys.executable),"streamlit") script_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'webui.py') cmd = [st_exe, "run", script_dir, "--server.address", host, diff --git a/chatchat-server/pyproject.toml b/chatchat-server/pyproject.toml index 82cd1fa9..51cb0ab0 100644 --- a/chatchat-server/pyproject.toml +++ b/chatchat-server/pyproject.toml @@ -30,13 +30,13 @@ pathlib = "~1.0.1" pytest = "~7.4.3" pyjwt = "2.8.0" elasticsearch = "*" -numexpr = ">=2.8.8" +numexpr = ">=1" #test strsimpy = ">=0.2.1" markdownify = ">=0.11.6" tqdm = ">=4.66.1" websockets = ">=12.0" numpy = "1.24.4" -pandas = "~2.1.4" +pandas = "~1" # test pydantic = "2.6.4" httpx = {version = ">=0.25.2", extras = ["brotli", "http2", "socks"]} python-multipart = "0.0.9"