/ test_import.py
test_import.py
 1  import sys
 2  import os
 3  
 4  # Try multiple paths
 5  paths_to_try = [
 6      '/home/unknown/parallelai',
 7      '/home/unknown/parallelai-swarm',
 8      os.path.expanduser('~/parallelai'),
 9      os.path.expanduser('~/parallelai-swarm'),
10      os.getcwd()
11  ]
12  
13  for path in paths_to_try:
14      if os.path.exists(path):
15          sys.path.insert(0, path)
16          try:
17              from llmswarm import LLMSwarm
18              print(f"✓ Success from: {path}")
19              print(f"  File location: {LLMSwarm.__module__}")
20              break
21          except ImportError as e:
22              print(f"✗ Failed from: {path}")
23              # Check what's there
24              if os.path.exists(os.path.join(path, 'llmswarm')):
25                  print(f"  Has llmswarm directory")
26              py_files = [f for f in os.listdir(path) if f.endswith('.py')]
27              if py_files:
28                  print(f"  Python files: {py_files[:3]}")