diff --git a/launch.py b/launch.py index edb38b6ad..895c9f140 100644 --- a/launch.py +++ b/launch.py @@ -74,6 +74,8 @@ def run_python(code, desc=None, errdesc=None): def run_pip(pkg, desc=None): + if desc is None: + desc = pkg index_url_line = f' --index-url {index_url}' if index_url != '' else '' return run(f'"{sys.executable}" -m pip {pkg} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}") diff --git a/requirements.txt b/requirements.txt index 3e74b039c..c44daabd1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -38,7 +38,6 @@ requests resize-right rich safetensors -scikit-image scipy tb_nightly toml @@ -50,9 +49,9 @@ tqdm voluptuous yapf +scikit-image==0.19.3 accelerate==0.18.0 opencv-python==4.7.0.72 -timm==0.6.13 diffusers==0.15.0 einops==0.4.1 gradio==3.23.0 @@ -62,3 +61,4 @@ protobuf==3.20.3 pytorch_lightning==1.9.4 tensorflow==2.12.0 transformers==4.26.1 +timm==0.6.13 diff --git a/setup.py b/setup.py index 315213539..f6f223cae 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,8 @@ def installed(package, friendly: str = None): if friendly: pkgs = [friendly] else: - pkgs = [p for p in package.split() if not p.startswith('-') and not p.startswith('git+') and not p.startswith('http') and not p.startswith('=')] + pkgs = [p for p in package.split() if not p.startswith('-') and not p.startswith('=')] + pkgs = [p.split('/')[-1] for p in pkgs] # get only package name if installing from url for pkg in pkgs: p = pkg.split('==') spec = pkg_resources.working_set.by_key.get(p[0], None) # more reliable than importlib @@ -243,7 +244,7 @@ def run_extension_installer(folder): log.debug(f"Running extension installer: {path_installer}") env = os.environ.copy() env['PYTHONPATH'] = os.path.abspath(".") - result = subprocess.run(f'"{sys.executable}" "{path_installer}"', shell=True, env=env, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + result = subprocess.run(f'"{sys.executable}" "{path_installer}"', shell=True, env=env, check=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=folder) if result.returncode != 0: global errors # pylint: disable=global-statement errors += 1