PowerModels and JuMP version conflict

Hi there, I’m trying to use the PowerModels package for a power flow project, however I’m having the following issue:

Anyone knows how to fix this?

See Error while adding a package - #3 by Arsenii_Grinchenko. (You can use the search tool to look for previously answered questions.)

I tried ] add PowerModels then ] add JuMP, however that restricted my JuMP to v0.18.5 and apparently JuMP.with_optimizer isn’t available until v0.19.0 or higher. So I tried to remove both, ] add JuMP and now I have the newest JuMP but cannot install PowerModels anymore (in the last section of my error message, if I’m understanding this correctly, PowerModels v0.9.6 would not cause a conflict with JuMP v0.19.1). I have no idea how to proceed. I might have to switch back to Matpower with Matlab instead.

You will see on the other thread that Pkg environments will trivially solve this issue for you. You can find the Pkg documentation here: 2. Getting Started · Pkg.jl.

You probably didn’t mean it negatively, but these kinds of comments are not really relevant and generally discouraged. Use whatever tool is best for the job.

Starting with a fresh environment, this works for me (removed some output):

$ mkdir tmp
$ cd tmp
$ julia
julia> ]
(v1.1) pkg> activate .
(tmp) pkg> add JuMP
(tmp) pkg> add PowerModels
(tmp) pkg> st
    Status `~/tmp/Project.toml`
  [4076af6c] JuMP v0.19.1
  [c36e90e8] PowerModels v0.10.0

Maybe some other packages in your project require a specific version of JuMP or PowerModels?

1 Like

So it turns out that I had JuliaPro (which I thought was the only thing there was) and uninstalled it, installed Julia and now it’s working. And my apologies for mentioning Matlab. I definitely didn’t mean anything negative, and I only switched from it because I thought Julia would have better performance and was quite frustrated by the error these past few days. So hopefully now everything will work fine.

1 Like