mirror of
https://github.com/modelscope/modelscope.git
synced 2025-12-25 12:39:25 +01:00
move venv import from file level to class level to avoid import error… (#575)
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/14301042 * move venv import from file level to class level to avoid import error… (#575) * move venv import from file level to class level to avoid import error on windows --------- authored-by: Zhicheng Zhang <zhangzhicheng.zzc@alibaba-inc.com>
This commit is contained in:
@@ -9,7 +9,6 @@ import os
|
||||
import pkgutil
|
||||
import shutil
|
||||
import sys
|
||||
import venv
|
||||
from contextlib import contextmanager
|
||||
from fnmatch import fnmatch
|
||||
from pathlib import Path
|
||||
@@ -1144,6 +1143,7 @@ class EnvsManager(object):
|
||||
cfg = read_config(model_dir)
|
||||
self.plugins = cfg.get('plugins', [])
|
||||
self.allow_remote = cfg.get('allow_remote', False)
|
||||
import venv
|
||||
self.env_builder = venv.EnvBuilder(
|
||||
system_site_packages=True,
|
||||
clear=False,
|
||||
|
||||
Reference in New Issue
Block a user