18 lines
701 B
Python
18 lines
701 B
Python
#!/usr/bin/env python3
|
|
"""Check if hermes_tools is available after activating venv."""
|
|
|
|
import sys
|
|
import os
|
|
import subprocess
|
|
|
|
# Get the venv python
|
|
venv_python = "/root/.hermes/installs/76f6e7e5145b5f39/environments/c5b879e2036d4c909805dd1858587925/venv/bin/python"
|
|
|
|
if os.path.exists(venv_python):
|
|
print(f"Venv python exists: {venv_python}")
|
|
result = subprocess.run([venv_python, "-c", "from hermes_tools import web_search, terminal, read_file; print('hermes_tools import: SUCCESS')"], capture_output=True, text=True)
|
|
print("stdout:", result.stdout)
|
|
print("stderr:", result.stderr)
|
|
print("returncode:", result.returncode)
|
|
else:
|
|
print(f"Venv python NOT found: {venv_python}") |