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") ...@@ -12,26 +12,14 @@ logger = logging.getLogger("DynarePython")
def check_julia_and_dynare(): def check_julia_and_dynare():
try: # Check Julia
# Check if Julia is installed julia_path = jl.seval("Sys.BINDIR")
julia_version = subprocess.check_output( julia_project = jl.seval("Base.active_project()")
["julia", "--version"], stderr=subprocess.STDOUT logger.info(f"Using julia at: {julia_path}")
)
logger.info(f"Julia is installed: {julia_version.decode().strip()}") # Installed packages
logger.info("Project status:")
# Check if Dynare package is installed in Julia jl.seval("import Pkg; Pkg.status()")
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.")
_has_run = False _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