Spaces:
Sleeping
Sleeping
update pre-installed dependencies
Browse files
env.py
CHANGED
@@ -25,16 +25,15 @@ def config_env():
|
|
25 |
}
|
26 |
|
27 |
env_name = os.path.basename(sys.prefix)
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
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'))
|