-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathcheck_agents_module.py
More file actions
40 lines (33 loc) · 1.21 KB
/
Copy pathcheck_agents_module.py
File metadata and controls
40 lines (33 loc) · 1.21 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
#!/usr/bin/env python3
"""
Simple script to check if the agents module is available.
"""
import sys
import os
print("Python version:", sys.version)
print("Python executable:", sys.executable)
print("Current working directory:", os.getcwd())
print("Python path:", sys.path)
try:
import agents
print("\nSuccessfully imported agents module")
print("agents module location:", agents.__file__)
try:
from agents.types import RunContext
print("Successfully imported RunContext from agents.types")
except ImportError as e:
print("Error importing RunContext from agents.types:", e)
except ImportError as e:
print("\nError importing agents module:", e)
print("\nTrying to find installed packages:")
try:
import pkg_resources
installed_packages = [d.project_name for d in pkg_resources.working_set]
print("Installed packages:", installed_packages)
# Check for openai-agents specifically
if 'openai-agents' in installed_packages:
print("openai-agents is installed")
else:
print("openai-agents is NOT installed")
except Exception as e:
print("Error listing installed packages:", e)