-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_env.py
More file actions
29 lines (25 loc) · 785 Bytes
/
Copy pathdebug_env.py
File metadata and controls
29 lines (25 loc) · 785 Bytes
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
# debug_env.py
import sys
import os
import transformers
print("--- Python Environment Diagnostic ---")
print(f"Python Executable: {sys.executable}")
print(f"Python Version: {sys.version}")
print("-" * 30)
print("Package Information:")
print(f"Transformers Version: {transformers.__version__}")
print(f"Transformers Library Path: {transformers.__file__}")
print("-" * 30)
print("System Path (where Python looks for imports):")
# Print each path on a new line for clarity
for p in sys.path:
print(p)
print("-" * 30)
print("PYTHONPATH Environment Variable:")
# Check if PYTHONPATH is set and print it
python_path_var = os.environ.get('PYTHONPATH')
if python_path_var:
print(python_path_var)
else:
print("PYTHONPATH is not set.")
print("-" * 30)