-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcheck_version.py
More file actions
28 lines (22 loc) · 801 Bytes
/
check_version.py
File metadata and controls
28 lines (22 loc) · 801 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
import sys
import site
import os
def run_version_check():
# Check current working directory
print("Current Working Directory:", os.getcwd())
# Check Python version
print("Python version:", sys.version)
#print("Python executable:", sys.executable)
# Check the site-packages directories
#print("Site-packages locations:", site.getsitepackages())
# Print sys.path
#print("Python Path:", sys.path)
# Check Haystack version
try:
print("Trying to import Haystack...")
from haystack import __version__ as haystack_version # Correct import statement
print("Haystack version:", haystack_version)
except ImportError as e:
print("Haystack is not installed.", e)
if __name__ == '__main__':
run_version_check()