Skip to content

[bug] Failed to precompile PandaModels on Mac M1 #2417

@yasirroni

Description

@yasirroni

Bug report checklis

  • Searched the issues page for similar reports

  • Read the relevant sections of the documentation

  • Browse the tutorials and tests for usefull code snippets and examples of use

  • Reproduced the issue after updating with pip install --upgrade pandapower (or git pull)

  • Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath

Reproducible Example

import pandapower as pp


pp.runpm_ac_opf(net)
pp.runpm_ac_opf(net, optimizer="ipopt")

Issue Description and Traceback

Running above code, I got this error

JuliaError: Exception 'Failed to precompile PandaModels [2dbab86a-7cbf-476f-9afe-75ffd3079e7c] to "/Users/macbookair/.julia/compiled/v1.10/PandaModels/jl_eidSz9".' occurred while calling julia code:
using PandaModels

On the other hand, I can run PowerModels directly using julia from Python just fine.

import julia
julia.install(quiet=True)

from matpower import path_matpower_cases

from julia import Main


Main.eval("""
    using PowerModels
    using Ipopt
    using JuMP

    nlp_solver = JuMP.optimizer_with_attributes(Ipopt.Optimizer, "tol"=>1e-6, "print_level"=>0)
""")

func_name = 'case9'
file_path = f"{path_matpower_cases}/{func_name}.m"

Main.eval('solver = optimizer_with_attributes(Ipopt.Optimizer, "tol" => 1e-6)')
result_ac  = Main.eval(f'solve_opf("{file_path}",   ACPPowerModel, solver)')

Expected Behavior

I can Main.eval just fine, PandaModels that relies on that should be able to run just fine.

Installed Versions

  • python version: '2.14.10' * Operating System name/version: MacOs, M1

Label

  • Relevant labels are selected

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions