andy-wyx commited on
Commit
f4ad80e
·
1 Parent(s): 879a563

update pre-installed dependencies

Browse files
Files changed (1) hide show
  1. env.py +9 -10
env.py CHANGED
@@ -25,16 +25,15 @@ def config_env():
25
  }
26
 
27
  env_name = os.path.basename(sys.prefix)
28
- if env_name == 'fossil': # in case pkgs installed to unexpected env during local dev
29
- for package, version in packages_to_install:
30
- package_spec = f"{package}=={version}" if version else package
31
- package_spec = name_to_command[package_spec] if package_spec in name_to_command else package_spec
32
- if not is_pkg_installed(package):
33
- subprocess.call(f"pip install {package_spec}".split())
34
- else:
35
- print(f"{package_spec} is already installed.")
36
- else:
37
- print("Please use venv named 'fossil' in case pkgs installed to other unexpected envs or locations.")
38
 
39
 
40
  #print(os.getenv('SYSTEM'))
 
25
  }
26
 
27
  env_name = os.path.basename(sys.prefix)
28
+ print(env_name)
29
+ for package, version in packages_to_install:
30
+ package_spec = f"{package}=={version}" if version else package
31
+ package_spec = name_to_command[package_spec] if package_spec in name_to_command else package_spec
32
+ if not is_pkg_installed(package):
33
+ subprocess.call(f"pip install {package_spec}".split())
34
+ else:
35
+ print(f"{package_spec} is already installed.")
36
+
 
37
 
38
 
39
  #print(os.getenv('SYSTEM'))