fix: venv改为懒加载,兼容嵌入式CPython无venv模块

This commit is contained in:
qinglong
2026-06-14 19:02:27 +08:00
parent b9252bdc58
commit 2c5cd57ad4
2 changed files with 10 additions and 2 deletions
+7
View File
@@ -4,9 +4,16 @@
import logging
import asyncio
import sys
import os as _os
import signal
import time
import argparse
# 确保项目根目录在 sys.path 中 (嵌入式 CPython / PyPy 需要)
_sys_path_root = _os.path.dirname(_os.path.abspath(__file__))
if _sys_path_root not in sys.path:
sys.path.insert(0, _sys_path_root)
from services.project_engine import ProjectEngine
from services.pyenv_manager import PyEnvManager
from services.proxy_service import ProxyService