-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify_setup.py
More file actions
executable file
·56 lines (46 loc) · 1.39 KB
/
Copy pathverify_setup.py
File metadata and controls
executable file
·56 lines (46 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env python3
"""
Setup verification script for baswana-sen-spanner-experiments.
Verifies that all required packages are installed and can be imported.
"""
import sys
def verify_imports():
"""Verify that all required packages can be imported."""
packages = {
'numpy': 'numpy',
'scipy': 'scipy',
'networkx': 'networkx',
'matplotlib': 'matplotlib',
'pandas': 'pandas',
'tqdm': 'tqdm',
'jupyter': 'jupyter',
'jupyterlab': 'jupyterlab',
}
failed = []
success = []
for name, module in packages.items():
try:
mod = __import__(module)
version = getattr(mod, '__version__', 'unknown')
success.append(f"✅ {name}: {version}")
except ImportError as e:
failed.append(f"❌ {name}: {e}")
print("=" * 60)
print("Package Import Verification")
print("=" * 60)
if success:
print("\nSuccessfully imported packages:")
for msg in success:
print(f" {msg}")
if failed:
print("\nFailed to import packages:")
for msg in failed:
print(f" {msg}")
return False
print("\n" + "=" * 60)
print("✅ All packages verified successfully!")
print("=" * 60)
return True
if __name__ == '__main__':
success = verify_imports()
sys.exit(0 if success else 1)