Skip to content
Snippets Groups Projects
Commit 38f19573 authored by Tamas Simon's avatar Tamas Simon
Browse files

Log different data

parent 0effbb07
No related branches found
No related tags found
No related merge requests found
......@@ -12,26 +12,14 @@ logger = logging.getLogger("DynarePython")
def check_julia_and_dynare():
try:
# Check if Julia is installed
julia_version = subprocess.check_output(
["julia", "--version"], stderr=subprocess.STDOUT
)
logger.info(f"Julia is installed: {julia_version.decode().strip()}")
# Check if Dynare package is installed in Julia
dynare_check = subprocess.check_output(
["julia", "-e", 'import Pkg; Pkg.status("Dynare")'],
stderr=subprocess.STDOUT,
)
if "Dynare" in dynare_check.decode():
logger.info("Dynare package is installed in Julia.")
else:
logger.info("Dynare package is not installed in Julia.")
except subprocess.CalledProcessError as e:
logger.info(f"An error occurred: {e.output.decode().strip()}")
except FileNotFoundError:
logger.info("Julia is not installed.")
# Check Julia
julia_path = jl.seval("Sys.BINDIR")
julia_project = jl.seval("Base.active_project()")
logger.info(f"Using julia at: {julia_path}")
# Installed packages
logger.info("Project status:")
jl.seval("import Pkg; Pkg.status()")
_has_run = False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment